/* R110 便民服务展示 H5 */

:root {
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --tab-bar-h: 56px;
  --contact-footer-h: 72px;
  --primary: #f59e0b;
  --primary-light: #fbbf24;
  --bg: #fefaf5;
  --bg-secondary: #faf3e0;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --accent: #10b981;
  --success: #059669;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="warm-orange"] { --primary:#f59e0b; --primary-light:#fbbf24; --bg:#fefaf5; --bg-secondary:#faf3e0; --text:#1f2937; --text-secondary:#6b7280; --accent:#10b981; --success:#059669; --danger:#ef4444; }
[data-theme="gov-blue"] { --primary:#1a56db; --primary-light:#4b8ae8; --bg:#ffffff; --bg-secondary:#f0f4ff; --text:#0B0C0C; --text-secondary:#505a5f; --accent:#f59e0b; --success:#10b981; --danger:#ef4444; }
[data-theme="emerald"] { --primary:#059669; --primary-light:#34d399; --bg:#ffffff; --bg-secondary:#ecfdf5; --text:#374151; --text-secondary:#6b7280; --accent:#f59e0b; --success:#22c55e; --danger:#ef4444; }
[data-theme="vibrant"] { --primary:#ef4444; --primary-light:#f87171; --bg:#ffffff; --bg-secondary:#fef2f2; --text:#1f2937; --text-secondary:#6b7280; --accent:#3b82f6; --success:#10b981; --danger:#dc2626; }
[data-theme="warm-beige"] { --primary:#e67e22; --primary-light:#f0a04b; --bg:#faf3e0; --bg-secondary:#f8ecd5; --text:#2c3e50; --text-secondary:#7f8c8d; --accent:#27ae60; --success:#2ecc71; --danger:#c0392b; }
[data-theme="navy-gold"] { --primary:#1a3a5c; --primary-light:#2c5f8a; --bg:#f8fafc; --bg-secondary:#e2e8f0; --text:#1e293b; --text-secondary:#475569; --accent:#e74c3c; --success:#3498db; --danger:#c0392b; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
body.has-tab-bar.has-contact-footer {
  padding-bottom: calc(var(--tab-bar-h) + var(--contact-footer-h) + var(--safe-area-bottom));
}
.theme-transition, .theme-transition * {
  transition: background-color .3s, color .3s, border-color .3s;
}

#app { max-width: 720px; margin: 0 auto; padding: 0 16px 16px; }
.page { min-height: 50vh; }
.page[hidden] { display: none !important; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px 16px 24px;
  margin: 0 -16px 16px;
}
.hero__loc { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero__community { margin: 0; font-size: 1.1rem; font-weight: 700; }
.hero__addr { margin: 2px 0 0; font-size: .8rem; opacity: .9; }
.hero__loc-btn {
  margin-left: auto; border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.15); color: #fff; border-radius: 20px;
  padding: 4px 12px; font-size: .75rem; cursor: pointer;
}
.hero__radar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2); position: relative;
  animation: radarScan 2s ease-out infinite;
}
.hero__search input {
  width: 100%; border: none; border-radius: 24px; padding: 12px 16px;
  font-size: .95rem; outline: none;
}
.hero__quick {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px;
}
.quick-entry {
  background: rgba(255,255,255,.2); border: none; border-radius: 10px;
  color: #fff; padding: 8px 4px; cursor: pointer; font-size: .7rem;
}
.quick-entry span { display: block; font-size: 1.3rem; }

/* Notify */
.notify {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px;
}
.notify--danger { background: #fef2f2; border-left: 4px solid var(--danger); color: #991b1b; }
.notify--warning { background: #fffbeb; border-left: 4px solid var(--primary); color: #92400e; }
.notify--info { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af; }
.notify__body p { margin: 4px 0 0; font-size: .85rem; }
.notify__close {
  border: none; background: transparent; font-size: 1.2rem; cursor: pointer; color: inherit;
}

/* Sections */
.section-title { font-size: 1rem; margin: 20px 0 12px; }
.service-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.service-card {
  background: var(--bg-secondary); border: none; border-radius: var(--radius);
  padding: 12px 6px; cursor: pointer; transition: transform .3s, box-shadow .3s;
}
.service-card:hover { animation: cardFloat .3s forwards; }
.service-card__icon {
  display: inline-flex; width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center; font-size: 1.2rem;
}
.service-card__name { display: block; font-size: .75rem; margin-top: 6px; color: var(--text); }

/* List */
.page-head h1 { font-size: 1.25rem; margin: 12px 0; }
.cat-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: none; margin-bottom: 10px;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; border: 1px solid var(--bg-secondary); background: var(--bg-secondary);
  border-radius: 20px; padding: 6px 12px; font-size: .78rem; cursor: pointer; color: var(--text);
}
.cat-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  position: relative;
}
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 16px;
  padding: 4px 10px; font-size: .72rem; cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.view-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.view-toggle button {
  flex: 1; border: 1px solid #e5e7eb; background: #fff; padding: 8px; border-radius: 8px; cursor: pointer;
}
.view-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.provider-list { display: flex; flex-direction: column; gap: 10px; }
.provider-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); cursor: pointer; position: relative;
  transition: transform .3s, box-shadow .3s;
}
.provider-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }
.provider-card__avatar { font-size: 2rem; }
.provider-card__body { flex: 1; min-width: 0; }
.provider-card__body h3 { margin: 0 0 4px; font-size: .95rem; }
.provider-card__meta { margin: 0; font-size: .78rem; color: var(--text-secondary); }
.provider-card__tags { margin: 6px 0; }
.provider-card__price { margin: 0; font-size: .82rem; font-weight: 600; color: var(--primary); }
.tag {
  display: inline-block; background: var(--bg-secondary); color: var(--text-secondary);
  font-size: .68rem; padding: 2px 6px; border-radius: 4px; margin-right: 4px;
}
.badge { font-size: .65rem; background: var(--accent); color: #fff; padding: 1px 5px; border-radius: 4px; }
.status {
  position: absolute; top: 10px; right: 10px; font-size: .65rem;
  padding: 2px 6px; border-radius: 4px;
}
.status--available { background: #ecfdf5; color: var(--success); }
.status--busy { background: #fffbeb; color: #d97706; }
.status--offline { background: #f3f4f6; color: #9ca3af; }
.star--full { color: #f59e0b; }
.star--empty { color: #d1d5db; }

.map-wrap { height: 320px; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }

/* Detail */
.detail-hero {
  font-size: 4rem; text-align: center; padding: 32px;
  background: var(--bg-secondary); border-radius: var(--radius); margin: 12px 0;
}
.detail-body { padding-bottom: 80px; }
.detail-body h1 { margin: 0 0 8px; font-size: 1.3rem; }
.detail-rating, .detail-price { color: var(--text-secondary); font-size: .88rem; }
.detail-price { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.detail-desc { font-size: .9rem; line-height: 1.7; }
.detail-actions {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-bar-h) + var(--contact-footer-h) + var(--safe-area-bottom));
  display: grid; grid-template-columns: 1fr 1.2fr 0.8fr; gap: 8px;
  padding: 10px 16px; background: #fff; border-top: 1px solid #eee; max-width: 720px; margin: 0 auto;
}
.btn-call, .btn-primary, .btn-nav, .btn-outline {
  border: none; border-radius: 10px; padding: 12px 8px; font-size: .85rem;
  cursor: pointer; text-align: center; text-decoration: none; display: inline-block;
}
.btn-call { background: var(--bg-secondary); color: var(--text); }
.btn-primary { background: var(--primary); color: #fff; font-weight: 600; }
.btn-nav { background: var(--accent); color: #fff; }
.btn-outline {
  margin-top: 12px; width: 100%; background: transparent;
  border: 1px solid var(--primary); color: var(--primary);
}

/* Activity */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-card {
  display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); cursor: pointer;
}
.activity-card__cover { font-size: 2.5rem; }
.activity-card__body h3 { margin: 0 0 4px; font-size: .95rem; }
.activity-card__body p { margin: 2px 0; font-size: .8rem; color: var(--text-secondary); }
.activity-card__cap { color: var(--accent) !important; font-weight: 600; }
.activity-card__cap.full { color: var(--text-secondary) !important; }
.link-more {
  display: block; width: 100%; margin: 12px 0 20px; border: none; background: transparent;
  color: var(--primary); font-size: .88rem; cursor: pointer; text-align: center;
}
.enroll-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.enroll-form input {
  border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; font-size: .9rem;
}

/* My / Orders */
.my-section { margin-bottom: 24px; }
.my-section h2 { font-size: .95rem; margin-bottom: 10px; }
.order-card {
  background: #fff; border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer;
}
.order-progress, .tracker-steps { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.step { flex: 1; min-width: 70px; text-align: center; font-size: .68rem; }
.step__dot {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #e5e7eb; margin: 0 auto 4px;
}
.step.done .step__dot { background: var(--primary); }
.step.done .step__label { color: var(--primary); font-weight: 600; }
.tracker-bar {
  height: 6px; background: #e5e7eb; border-radius: 3px; margin: 16px 0;
  overflow: hidden;
}
.tracker-bar::after {
  content: ''; display: block; height: 100%; width: var(--progress, 25%);
  background: var(--primary); animation: progressFill .8s ease-out;
}
.enroll-item { font-size: .85rem; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }

/* Theme */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-swatch {
  border: 2px solid transparent; border-radius: 10px; padding: 10px 6px;
  font-size: .72rem; cursor: pointer; background: var(--bg-secondary);
  position: relative;
}
.theme-swatch::before {
  content: ''; display: block; width: 100%; height: 8px; border-radius: 4px;
  background: var(--swatch); margin-bottom: 6px;
}
.theme-swatch.active { border-color: var(--swatch); font-weight: 700; }
.home-theme { margin: 20px 0; }

/* Tab bar */
.tab-bar {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom));
  height: var(--tab-bar-h); background: #fff; border-top: 1px solid #eee;
  display: grid; grid-template-columns: repeat(4, 1fr); z-index: 100;
  max-width: 720px; margin: 0 auto;
}
.tab-item {
  border: none; background: transparent; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: .68rem;
  color: var(--text-secondary); cursor: pointer; padding: 6px 0;
}
.tab-item.active { color: var(--primary); font-weight: 600; }
.tab-icon { font-size: 1.2rem; }

/* Contact footer */
.contact-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  background: #1a1a1a; padding: 8px 12px calc(6px + var(--safe-area-bottom));
}
.contact-footer__btns {
  display: grid; grid-template-columns: repeat(3, minmax(0, 88px));
  justify-content: center; gap: 8px; max-width: 320px; margin: 0 auto 4px;
}
.contact-footer__cta {
  background: #c41e1e !important; color: #fff !important; text-align: center;
  border-radius: 6px; padding: .48rem .2rem; font-size: .72rem; text-decoration: none;
}
.contact-footer__btn {
  background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: 6px; padding: .48rem .2rem; font-size: .72rem; cursor: pointer;
  text-align: center; text-decoration: none;
}
.contact-footer__brand {
  text-align: center; font-size: .62rem; color: rgba(255,255,255,.5); margin: 0;
}
body.has-contact-footer .zw-root .zw-fab {
  bottom: calc(var(--contact-footer-h) + var(--tab-bar-h) + var(--safe-area-bottom) + 8px);
}

/* Toast & empty */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(var(--tab-bar-h) + var(--contact-footer-h) + 24px);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px;
  border-radius: 20px; font-size: .85rem; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--ok { background: var(--success); }
.empty { text-align: center; color: var(--text-secondary); padding: 32px 16px; font-size: .9rem; }

/* Particles */
.particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
}
.particle {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-100%); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); }
  50% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
}
@keyframes cardFloat {
  to { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
}
@keyframes tabSlide {
  from { opacity: .6; }
  to { opacity: 1; }
}
@keyframes progressFill {
  from { width: 0; }
  to { width: var(--progress, 25%); }
}
@keyframes radarScan {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
  70% { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
@keyframes numberSpin {
  from { transform: rotateX(90deg); opacity: 0; }
  to { transform: rotateX(0); opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes particleBurst {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0); }
}
@keyframes themeTransition {
  from { filter: brightness(.95); }
  to { filter: brightness(1); }
}

.anim-fadeInUp { opacity: 0; transform: translateY(16px); }
.page:not([hidden]) .anim-fadeInUp,
.anim-fadeInUp.in-view {
  opacity: 1;
  transform: none;
  animation: fadeInUp .5s ease both;
}
.anim-slideDown { animation: slideDown .4s ease both; }
.anim-pulse { animation: pulse 2s infinite; }
.anim-tabSlide { animation: tabSlide .3s ease; }
.anim-progressFill { animation: progressFill .8s ease-out; }
.anim-particleBurst { animation: particleBurst .9s ease-out forwards; }

/* Responsive */
@media (min-width: 768px) {
  #app { padding: 0 24px 24px; }
  .hero { margin: 0 -24px 20px; padding: 28px 24px 32px; }
  .service-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .provider-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .activity-list { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  #app { max-width: 960px; }
  .service-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (min-width: 1440px) {
  #app { max-width: 1100px; }
  .provider-list { grid-template-columns: repeat(3, 1fr); }
}

/* Skeleton */
body.is-loading #app { visibility: hidden; }
.skeleton {
  max-width: 720px; margin: 0 auto; padding: 16px;
}
.skeleton-hero {
  height: 160px; border-radius: var(--radius); margin-bottom: 16px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.skeleton-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.skeleton-cell {
  height: 72px; border-radius: 10px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.skeleton-line {
  height: 14px; border-radius: 6px; margin-bottom: 10px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.skeleton-line.short { width: 60%; }

/* P1 entries */
.p1-entries {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px;
}
.p1-entry {
  border: none; background: var(--bg-secondary); border-radius: 10px;
  padding: 10px 4px; cursor: pointer; font-size: .65rem; color: var(--text);
}
.p1-entry span { display: block; font-size: 1.2rem; }

/* Finder */
.sub { color: var(--text-secondary); font-size: .85rem; margin: 0 0 12px; }
.finder-progress { height: 4px; background: #e5e7eb; border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
.finder-progress__bar { height: 100%; background: var(--primary); transition: width .3s; }
.finder-q { font-size: 1.1rem; margin-bottom: 16px; }
.finder-options { display: flex; flex-direction: column; gap: 10px; }
.finder-opt {
  text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: var(--radius);
  padding: 14px 16px; font-size: .95rem; cursor: pointer;
}
.finder-opt:active { border-color: var(--primary); background: var(--bg-secondary); }
.finder-actions { display: flex; gap: 10px; margin-top: 20px; }
.finder-actions .btn-outline, .finder-actions .btn-primary { flex: 1; }

/* Mutual */
.mutual-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.mutual-card {
  background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.mutual-card__head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.mutual-card__type { font-size: .72rem; color: var(--accent); font-weight: 600; }
.mutual-card__bounty { font-size: .78rem; color: var(--primary); font-weight: 600; }
.mutual-card__meta { font-size: .78rem; color: var(--text-secondary); }
.mutual-form {
  background: var(--bg-secondary); border-radius: var(--radius); padding: 16px;
}
.mutual-form select, .mutual-form input {
  width: 100%; margin-bottom: 10px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px;
}
.btn-sm { padding: 8px 14px; font-size: .8rem; margin-top: 8px; }

/* Ledger */
.ledger-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
  box-shadow: var(--shadow); text-align: center;
}
.ledger-summary p { margin: 4px 0 0; font-size: 1rem; font-weight: 700; color: var(--primary); }
.ledger-summary__bal p { color: var(--accent); }
.ledger-section { margin-bottom: 20px; }
.ledger-section h2 { font-size: .95rem; margin-bottom: 10px; }
.ledger-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 140px;
  background: #fff; border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
}
.ledger-month { flex: 1; text-align: center; font-size: .65rem; color: var(--text-secondary); }
.ledger-bars { display: flex; gap: 3px; align-items: flex-end; height: 110px; justify-content: center; }
.ledger-bar { width: 14px; border-radius: 4px 4px 0 0; position: relative; min-height: 4px; }
.ledger-bar span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: .55rem; white-space: nowrap; }
.ledger-bar--in { background: var(--accent); }
.ledger-bar--out { background: var(--danger); }
.ledger-legend { font-size: .75rem; color: var(--text-secondary); text-align: center; margin-top: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 12px; }
.dot--in { background: var(--accent); }
.dot--out { background: var(--danger); }
.ledger-cols { display: grid; gap: 12px; }
.ledger-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px;
  font-size: .82rem; padding: 8px 0; border-bottom: 1px solid #f3f4f6;
}

/* About */
.about-card {
  background: #fff; border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.about-card h2 { font-size: .95rem; margin: 0 0 10px; }
.about-privacy p { font-size: .82rem; color: var(--text-secondary); line-height: 1.6; }

/* My tabs & favs */
.my-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.my-tab {
  flex-shrink: 0; border: 1px solid #e5e7eb; background: #fff; border-radius: 16px;
  padding: 5px 10px; font-size: .72rem; cursor: pointer;
}
.my-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.fav-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-chip {
  border: 1px solid var(--bg-secondary); background: var(--bg-secondary);
  border-radius: 20px; padding: 6px 12px; font-size: .78rem; cursor: pointer;
}

/* Notify expand */
.notify__clip {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.notify__more { font-size: .75rem; color: inherit; opacity: .8; }
.notify--expanded .notify__body { cursor: default; }

/* P1 Sheet */
.p1-sheet {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center;
}
.p1-sheet[hidden] { display: none !important; }
.p1-sheet__mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.p1-sheet__panel {
  position: relative; width: 100%; max-width: 520px; max-height: 90vh;
  background: var(--bg); border-radius: 16px 16px 0 0; overflow-y: auto;
  padding: 16px; padding-bottom: calc(16px + var(--safe-area-bottom));
}
body.sheet-open { overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head button { border: none; background: transparent; font-size: 1.4rem; cursor: pointer; }
.share-canvas { width: 100%; height: auto; border-radius: 8px; display: block; }
.sheet-tip { font-size: .78rem; color: var(--text-secondary); text-align: center; }
.review-form label { display: block; font-size: .85rem; margin: 10px 0 6px; }
.star-picker, .tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.review-form textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; margin-bottom: 12px;
}

@media (min-width: 768px) {
  .p1-entries { grid-template-columns: repeat(5, 1fr); }
  .ledger-cols { grid-template-columns: 1fr 1fr; }
}

/* Share landing page */
body.share-page { background: var(--bg); }
body.share-page #app { display: none; }
.share-main {
  max-width: 720px; margin: 0 auto; padding: 16px 16px 24px;
}
body.share-page.has-contact-footer {
  padding-bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom));
}
.share-landing-card {
  background: #fff; border-radius: var(--radius); padding: 20px 16px;
  box-shadow: var(--shadow);
}
.share-eyebrow { font-size: .82rem; color: var(--primary); font-weight: 600; margin: 0 0 8px; }
.share-landing-card h1 { font-size: 1.35rem; margin: 0 0 8px; line-height: 1.35; }
.share-tagline { color: var(--primary); font-weight: 600; margin: 0 0 10px; font-size: .92rem; }
.share-desc { color: var(--text-secondary); font-size: .88rem; line-height: 1.6; margin: 0 0 16px; }
.share-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px;
}
.share-stat {
  background: var(--bg-secondary); border-radius: 10px; padding: 10px 6px; text-align: center;
}
.share-stat strong { display: block; font-size: 1rem; color: var(--primary); }
.share-stat span { font-size: .65rem; color: var(--text-secondary); }
.share-svc-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.share-svc-chip {
  font-size: .72rem; background: var(--bg-secondary); padding: 4px 8px; border-radius: 12px;
}
.share-provider-list {
  list-style: none; padding: 0; margin: 0 0 16px;
}
.share-provider-list li {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: .85rem;
}
.share-provider-list span { color: var(--text-secondary); font-size: .78rem; }
.share-cta { display: block; text-align: center; text-decoration: none; margin-bottom: 16px; }
.btn-block { width: 100%; display: block; margin-bottom: 10px; }
.share-qr-block {
  text-align: center; padding: 16px; background: var(--bg-secondary); border-radius: var(--radius);
  margin-bottom: 16px;
}
.share-qr-block p { margin: 0 0 10px; font-weight: 600; }
.share-qr-block small { color: var(--text-secondary); font-size: .72rem; }
.share-poster-panel h2 { font-size: .95rem; margin: 0 0 6px; }
.share-canvas-wrap { margin: 12px 0; overflow-x: auto; }
.share-canvas-wrap canvas { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid #eee; }
.share-link-btn { margin-top: 10px; text-align: center; text-decoration: none; }
