/* R54 装修进度展示 v1 · 暖木居 */
:root {
  --primary: #B45309; --accent: #F59E0B; --bg: #FFFBEB; --bg-light: #FEF3C7;
  --card: #FFFFFF; --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: 'PingFang SC', -apple-system, 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(12px); }
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: .5rem; padding: .55rem 1rem; flex-wrap: wrap; }
.top-nav__brand { font-weight: 700; color: var(--primary); font-size: .88rem; max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-badge { font-size: .65rem; padding: .2rem .5rem; border-radius: 999px; background: rgba(180,83,9,.12); color: var(--primary); border: 1px dashed var(--primary); white-space: nowrap; }
.top-nav__menu { margin-left: auto; border: 1px solid var(--border); background: var(--card); color: var(--text); 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; font-size: .82rem; border-radius: 6px; }
.top-nav__share { border: 1px dashed var(--border) !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); max-height: 280px; overflow-y: auto; }
.theme-appearance-btn, .theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); 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(--accent); }

.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 .15rem; border: none; background: none; font-size: .64rem; color: var(--text-muted); text-align: center; 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(--bg); border: 1px solid var(--border); color: var(--text); 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: 720px; margin: 0 auto; }
.section__title { font-size: 1.3rem; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: .35rem; }
.section__sub { text-align: center; font-size: .78rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.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: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
body[data-appearance="dark"] .btn-primary { color: #1A1205; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-sm { padding: .45rem .9rem; font-size: .78rem; }
.btn-block { display: block; width: 100%; margin-top: .5rem; text-align: center; }

.hero { position: relative; min-height: 480px; display: flex; align-items: center; justify-content: center; max-width: none; padding: 0; text-align: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,251,235,.3), var(--bg)); }
body[data-appearance="dark"] .hero__overlay { background: linear-gradient(to bottom, rgba(26,18,5,.4), var(--bg)); }
.hero__content { position: relative; z-index: 2; padding: 2rem 1.25rem; max-width: 640px; }
.hero__tag { font-size: .72rem; color: var(--text-muted); margin-bottom: .5rem; }
.hero__title { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: .35rem; }
.hero__sub { font-size: .88rem; color: var(--text-muted); margin-bottom: .75rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; font-size: .75rem; color: var(--text-muted); margin-bottom: 1rem; }
.hero__meta span { padding: .25rem .55rem; border-radius: 999px; background: var(--card); border: 1px solid var(--border); }

.hero__progress { display: flex; align-items: center; gap: 1.25rem; padding: 1rem 1.25rem; margin: 1rem 0; text-align: left; }
.progress-ring { position: relative; flex-shrink: 0; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring__bg { fill: none; stroke: var(--border); stroke-width: 8; }
.progress-ring__fill { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.progress-ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.progress-ring__label strong { font-size: 1.35rem; color: var(--primary); line-height: 1; }
.progress-ring__label small { font-size: .65rem; color: var(--text-muted); }
.hero__progress-info { flex: 1; font-size: .78rem; line-height: 1.7; }
.hero__progress-info strong { color: var(--primary); }
.stage-mini-bar { display: flex; gap: 3px; margin-top: .5rem; }
.stage-mini { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.stage-mini.done { background: var(--primary); }
.stage-mini.active { background: var(--accent); animation: pulse-bar 1.5s ease infinite; }
@keyframes pulse-bar { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 18px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 1rem; }
.timeline-item__marker { position: absolute; left: -1.5rem; top: 1rem; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; z-index: 2; }
.timeline-item--done .timeline-item__marker { border-color: var(--primary); background: rgba(180,83,9,.15); }
.timeline-item--active .timeline-item__marker { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245,158,11,.25); animation: pulse-ring 2s ease infinite; }
@keyframes pulse-ring { 0%, 100% { box-shadow: 0 0 0 4px rgba(245,158,11,.25); } 50% { box-shadow: 0 0 0 8px rgba(245,158,11,.1); } }
.timeline-item__icon { font-size: .9rem; }
.timeline-item__body { padding: 1rem; margin-left: .5rem; }
.timeline-item__head { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; background: none; border: none; cursor: pointer; text-align: left; color: var(--text); padding: 0; margin-bottom: .35rem; }
.status-pill { font-size: .62rem; padding: .15rem .4rem; border-radius: 999px; font-weight: 600; margin-left: .35rem; vertical-align: middle; }
.status-pill--done { background: rgba(22,163,74,.15); color: #16A34A; }
.status-pill--active { background: rgba(245,158,11,.2); color: var(--primary); }
.status-pill--pending { background: var(--bg-light); color: var(--text-muted); }
.timeline-item__date { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.timeline-item__desc { font-size: .82rem; color: var(--text-muted); margin-bottom: .65rem; }
.timeline-item__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .65rem; }
.timeline-item__photos.is-collapsed { display: none; }
.timeline-photo { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.timeline-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.ba-tabs { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.ba-tab { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-muted); cursor: pointer; font-size: .78rem; }
.ba-tab.active { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.ba-slider { position: relative; height: 240px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); cursor: ew-resize; user-select: none; touch-action: none; }
@media (min-width: 640px) { .ba-slider { height: 320px; } }
.ba-slider__after, .ba-slider__before { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ba-slider__before-wrap { position: absolute; inset: 0; overflow: hidden; z-index: 2; }
.ba-slider__handle { position: absolute; top: 0; bottom: 0; width: 4px; background: #fff; z-index: 3; transform: translateX(-50%); box-shadow: 0 0 8px rgba(0,0,0,.4); }
.ba-slider__handle::after { content: '↔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #fff; color: #333; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ba-label { position: absolute; top: 10px; z-index: 4; font-size: .68rem; font-weight: 700; padding: .2rem .5rem; border-radius: 4px; background: rgba(0,0,0,.55); color: #fff; }
.ba-label--before { left: 10px; }
.ba-label--after { right: 10px; }
.ba-caption { text-align: center; font-size: .78rem; color: var(--text-muted); margin-top: .65rem; }

.inspect-grid { display: flex; flex-direction: column; gap: .75rem; }
.inspect-card { padding: 1rem; }
.inspect-card--pass { border-left: 4px solid #16A34A; }
.inspect-card--fail { border-left: 4px solid #DC2626; }
.inspect-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.inspect-badge { font-size: .72rem; font-weight: 700; }
.inspect-card__meta { font-size: .72rem; color: var(--text-muted); margin-bottom: .5rem; }
.inspect-card__items { padding-left: 1.1rem; font-size: .82rem; }
.inspect-card__items li { margin-bottom: .25rem; }
.inspect-card__note { font-size: .72rem; color: var(--primary); margin-top: .5rem; font-style: italic; }

.update-feed { display: flex; flex-direction: column; gap: .65rem; }
.update-card { padding: 1rem; }
.update-card__time { display: block; font-size: .68rem; color: var(--text-muted); margin-bottom: .35rem; }
.update-card__text { font-size: .88rem; line-height: 1.6; }
.update-card__imgs { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.update-card__imgs img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

.team-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.25rem; }
.team-card__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); }
.team-card__info { flex: 1; min-width: 140px; }
.team-card__info h3 { font-size: 1.05rem; color: var(--primary); }
.team-card__info p { font-size: .78rem; color: var(--text-muted); }
.team-card__co { font-size: .72rem !important; margin-top: .2rem; }
.team-card__actions { display: flex; flex-direction: column; gap: .4rem; width: 100%; }
@media (min-width: 480px) { .team-card__actions { width: auto; } }

.reno-toast { position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: rgba(69,26,3,.92); color: #fff; padding: .55rem 1rem; border-radius: 999px; font-size: .78rem; z-index: 999; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.reno-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

.share-page { max-width: 480px; margin: 0 auto; padding: 1.5rem 1rem 6rem; text-align: center; }
.share-page h1 { font-size: 1.25rem; color: var(--primary); margin-bottom: .5rem; }
.share-page p { font-size: .82rem; color: var(--text-muted); margin-bottom: 1rem; }
.share-tabs { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: 1.25rem; }
#poster-wrap { margin: 1rem 0; }
#poster-wrap canvas { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); }
