/* R75 车友活动报名 H5 · 赛道红黑主题 */
:root {
  --color-primary: #E10600;
  --color-secondary: #1A1A1A;
  --color-accent: #FFD700;
  --color-bg: #F8F9FA;
  --color-text: #343A40;
  --color-surface: #FFFFFF;
  --color-light-gray: #E9ECEF;
  --color-ongoing: #FF5722;
  --color-upcoming: #FF9800;
  --color-registering: #E10600;
  --color-ended: #757575;
  --color-register: #00C853;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --font: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --contact-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  padding-bottom: calc(var(--contact-h) + var(--safe-bottom));
}
body.sheet-open { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; }

.top-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.top-bar__brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.top-bar__logo { border-radius: 8px; object-fit: cover; }
.top-bar__actions { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(0,0,0,.04); font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}

.theme-panel {
  position: sticky; top: 56px; z-index: 49;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 16px; background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.theme-chip {
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
}

.hero {
  position: relative; min-height: 280px; max-height: 440px;
  background: var(--color-secondary) center/cover no-repeat;
  display: flex; align-items: flex-end;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.75) 100%);
}
.hero__content {
  position: relative; z-index: 1; width: 100%;
  padding: 32px 20px 28px; color: #fff;
}
.hero__eyebrow { margin: 0 0 8px; font-size: 13px; opacity: .9; }
.hero__content h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; }
.hero__subtitle { margin: 0 0 14px; font-size: 14px; opacity: .88; }
.hero__countdown {
  margin-bottom: 16px; font-size: 15px; font-variant-numeric: tabular-nums;
}
.hero__countdown span { font-weight: 700; font-size: 18px; color: var(--color-accent); }

.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px;
  font-size: 14px; border: 1px solid rgba(0,0,0,.1); background: #fff;
}
.filter-chip.is-active {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}

.section-title { margin: 0 0 14px; font-size: 18px; padding: 0 16px; }

.event-main { padding: 8px 16px 24px; }
.event-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 640px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

.event-card {
  background: var(--color-surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.event-card:hover { transform: translateY(-2px); }
.event-card__cover { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.event-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card__type {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.92);
}
.event-card__status {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; color: #fff;
}
.status--registering { background: var(--color-registering); }
.status--upcoming { background: var(--color-upcoming); }
.status--ongoing { background: var(--color-ongoing); }
.status--full { background: #9e9e9e; }
.status--ended { background: var(--color-ended); }
.event-card__body { padding: 14px; }
.event-card__body h3 { margin: 0 0 8px; font-size: 16px; }
.event-card__meta { margin: 0 0 4px; font-size: 13px; color: #666; }

.capacity-bar {
  height: 6px; border-radius: 999px; background: var(--color-light-gray);
  overflow: hidden; margin: 10px 0 6px;
}
.capacity-bar--sm { height: 4px; }
.capacity-bar__fill {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.capacity-text { margin: 0 0 10px; font-size: 12px; color: #888; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 2px solid transparent; transition: opacity .2s;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--outline { background: #fff; border-color: var(--color-primary); color: var(--color-primary); }
.btn--full { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.member-wall { padding: 8px 0 24px; overflow: hidden; }
.member-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.member-card {
  flex-shrink: 0; width: 120px; padding: 14px 10px;
  background: var(--color-surface); border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center;
}
.member-card img { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 8px; object-fit: cover; }
.member-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.member-card span { display: block; font-size: 11px; color: #666; }
.member-card small { display: block; margin-top: 6px; font-size: 11px; color: var(--color-primary); }

.faq-section { padding: 0 16px 24px; }
.faq-item {
  background: var(--color-surface); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin: 10px 0 0; font-size: 14px; color: #555; }

.trust-footer {
  margin: 0 16px 24px; padding: 24px; text-align: center;
  background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.trust-footer h2 { margin: 0 0 8px; font-size: 18px; }
.trust-footer p { margin: 0 0 16px; font-size: 14px; color: #666; }
.trust-footer img { margin: 0 auto 12px; border-radius: 8px; }
.trust-footer .btn { margin-top: 12px; }

/* Sheets */
.detail-sheet, .register-sheet {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
}
.detail-sheet:not([hidden]), .register-sheet:not([hidden]) { pointer-events: auto; }
.detail-sheet__backdrop, .register-sheet__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; transition: opacity .28s ease;
}
.detail-sheet.is-open .detail-sheet__backdrop,
.register-sheet.is-open .register-sheet__backdrop { opacity: 1; }
.detail-sheet__panel, .register-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92vh; background: #fff;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  overflow: hidden; display: flex; flex-direction: column;
}
.detail-sheet.is-open .detail-sheet__panel,
.register-sheet.is-open .register-sheet__panel { transform: translateY(0); }
.register-sheet { z-index: 210; }
.detail-sheet__close, .register-sheet__close {
  position: absolute; top: 8px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.06); font-size: 22px; line-height: 1;
}
.detail-sheet__body, .register-sheet__body {
  overflow-y: auto; padding-bottom: calc(24px + var(--safe-bottom));
}
.detail-hero { position: relative; aspect-ratio: 16/9; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-content { padding: 16px 20px 24px; }
.detail-content h2 { margin: 8px 0 12px; font-size: 22px; }
.detail-meta { padding: 0; margin: 0 0 16px; list-style: none; font-size: 14px; color: #555; }
.detail-meta li { margin-bottom: 6px; }
.detail-nav { display: flex; gap: 8px; margin: 0 0 14px; }
.detail-nav .btn { flex: 1; }
.schedule { margin: 16px 0; }
.schedule h3 { margin: 0 0 10px; font-size: 15px; }
.schedule ul { margin: 0; padding: 0; list-style: none; }
.schedule li { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; }
.schedule li span { display: inline-block; min-width: 52px; font-weight: 600; color: var(--color-primary); }
.notice-box {
  padding: 12px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--color-primary) 8%, #fff);
  border-left: 3px solid var(--color-primary);
}
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 16px; }
.gallery-grid img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; width: 100%; }

/* 报名向导 */
.reg-steps {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 16px 16px 0; font-size: 11px;
}
.reg-step {
  padding: 4px 8px; border-radius: 999px;
  background: var(--color-light-gray); color: #666;
}
.reg-step.is-active { background: var(--color-primary); color: #fff; }
.reg-step.is-done { background: color-mix(in srgb, var(--color-register) 20%, #fff); color: #2e7d32; }
.register-sheet__body { padding-bottom: calc(32px + var(--safe-bottom)); }
.ticket-grid { display: grid; gap: 10px; padding: 16px; }
.ticket-card {
  text-align: left; padding: 14px; border-radius: var(--radius);
  border: 2px solid rgba(0,0,0,.08); background: #fff;
}
.ticket-card.is-active { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 6%, #fff); }
.ticket-card.is-rec { position: relative; }
.ticket-card.is-rec::after {
  content: '推荐'; position: absolute; top: 8px; right: 8px;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--color-accent); color: var(--color-secondary);
}
.ticket-card strong { display: block; font-size: 16px; }
.ticket-card span { display: block; margin-top: 4px; color: var(--color-primary); font-weight: 700; }
.ticket-card small { display: block; margin-top: 4px; font-size: 12px; color: #888; }

.reg-form { padding: 16px; }
.reg-form label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.reg-form input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px; font-size: 15px;
}
.confirm-box { padding: 16px; font-size: 14px; line-height: 1.8; }
.confirm-box p { margin: 0 0 8px; }
.reg-actions {
  display: flex; gap: 10px; padding: 0 16px 16px;
}
.reg-actions .btn { flex: 1; }
.reg-msg { padding: 0 16px; font-size: 14px; color: #c62828; }
.reg-msg.is-success { color: var(--color-register); }

/* 车型选择器 */
.car-selector { padding: 16px; }
.cs-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cs-mode {
  padding: 8px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
}
.cs-mode.is-active { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.cs-search {
  flex: 1; min-width: 140px; padding: 8px 12px;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px; font-size: 14px;
}
.cs-selected {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--color-primary) 10%, #fff);
  font-size: 13px; font-weight: 600;
}
.cs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
@media (min-width: 480px) { .cs-grid { grid-template-columns: repeat(3, 1fr); } }
.cs-brand-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: var(--radius);
  border: 2px solid rgba(0,0,0,.08); background: #fff;
}
.cs-brand-card.is-active { border-color: var(--color-primary); }
.cs-brand-abbr {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-secondary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.cs-cascade { display: grid; gap: 12px; }
.cs-level h4 { margin: 0 0 8px; font-size: 13px; color: #888; }
.cs-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 6px; border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08); background: #fff; font-size: 14px;
}
.cs-item.is-active { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, #fff); }
.cs-item strong { display: block; }
.cs-item span { font-size: 12px; color: #888; }
.cs-placeholder { margin: 0; font-size: 13px; color: #aaa; }
.cs-search-results {
  margin-top: 10px; border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius); overflow: hidden;
}
.cs-search-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.06);
  background: #fff; font-size: 14px;
}

.contact-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  padding: 6px 12px calc(6px + var(--safe-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 -2px 10px rgba(0,0,0,.05);
  backdrop-filter: blur(8px);
}
.contact-footer__btns {
  display: flex; gap: 6px; justify-content: center; align-items: center;
}
.contact-footer__cta, .contact-footer__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.contact-footer__cta { background: var(--color-primary); color: #fff; }
.contact-footer__btn {
  background: #fff; color: var(--color-text); border: 1px solid rgba(0,0,0,.1);
}
.contact-footer__brand { margin: 4px 0 0; text-align: center; font-size: 10px; color: #999; }

.empty-state { text-align: center; color: #888; padding: 32px 16px; }

/* 地图 */
.event-map-section { padding: 8px 16px 16px; }
.map-hint { margin: -8px 0 12px; font-size: 12px; color: #888; }
.map-provider-toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.map-provider-btn {
  flex: 1; padding: 8px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
}
.map-provider-btn.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.event-map {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #e8eef5;
}
.event-map--live { width: 100%; }
.event-map--live .leaflet-container {
  width: 100%; height: 100%;
  font-family: var(--font);
  z-index: 1;
}
.leaflet-marker-wrap { background: none; border: none; }
.leaflet-marker-wrap .amap-marker { transform: rotate(0); border-radius: 50%; width: 28px; height: 28px; }
.event-map__fallback { position: relative; width: 100%; height: 100%; min-height: 200px; }
.event-map__static { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-map__placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 48px; background: linear-gradient(135deg, #1a1a1a, #333);
  color: #fff;
}
.event-map__fallback-msg {
  position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0;
  padding: 8px 12px; border-radius: 8px; font-size: 12px; color: #fff;
  background: rgba(0,0,0,.55); text-align: center;
}
.amap-marker {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; border: 2px solid #fff;
}
.amap-marker.status--registering { background: var(--color-registering); }
.amap-marker.status--upcoming { background: var(--color-upcoming); }
.amap-marker.status--ongoing { background: var(--color-ongoing); }
.map-legend { list-style: none; margin: 12px 0 0; padding: 0; }
.map-legend__row {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,.06); padding: 8px 0;
}
.map-legend__item {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 0; border: none; background: none; text-align: left; cursor: pointer;
}
.map-legend__text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.map-legend__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.map-legend__dot.status--registering { background: var(--color-registering); }
.map-legend__dot.status--upcoming { background: var(--color-upcoming); }
.map-legend__nav { display: flex; gap: 6px; }
.map-nav-link {
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  text-decoration: none; border: 1px solid rgba(0,0,0,.1); background: #fff;
}
.map-legend__empty { color: #888; font-size: 13px; padding: 8px 0; }

/* Share page */
body.share-page {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 24px 16px calc(100px + var(--safe-bottom));
}
.share-card {
  background: #fff; border-radius: 16px; padding: 28px 20px;
  box-shadow: var(--shadow); text-align: center;
  max-width: 440px; margin: 0 auto; width: 100%;
}
.share-card__eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--color-primary); }
.share-logo-wrap {
  width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 16px; overflow: hidden; border: 3px solid var(--color-secondary);
}
.share-logo { width: 100%; height: 100%; object-fit: cover; }
.share-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.share-card__tagline { margin: 0 0 8px; font-size: 14px; color: #666; }
.share-card__desc { margin: 0 0 16px; font-size: 13px; color: #888; line-height: 1.6; }
.share-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.share-stat { background: var(--color-bg); border-radius: var(--radius); padding: 10px 8px; }
.share-stat strong { display: block; font-size: 20px; color: var(--color-primary); }
.share-stat span { font-size: 11px; color: #666; }
.share-event-list { list-style: none; margin: 0 0 16px; padding: 0; text-align: left; }
.share-event-list li {
  padding: 12px; margin-bottom: 8px; border-radius: var(--radius);
  background: var(--color-bg); font-size: 13px;
}
.share-event-list li strong { display: block; margin: 4px 0; font-size: 15px; }
.share-event-list li span { color: #666; }
.share-event-list__status {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #fff;
}
.share-event-list__empty { text-align: center; color: #888; }
.share-poster-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,.08); text-align: left; }
.share-poster-panel h2 { margin: 0 0 6px; font-size: 17px; text-align: center; }
.share-poster-hint { margin: 0 0 12px; font-size: 12px; color: #888; text-align: center; }
.poster-wrap canvas { width: 100%; height: auto; border-radius: 8px; }
.share-card .btn { margin-bottom: 10px; }
.app-toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px; background: rgba(26,26,26,.92); color: #fff;
  font-size: 14px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 400;
}
.app-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

body[data-theme="nightPurple"] {
  color: var(--color-text);
}
body[data-theme="nightPurple"] .top-bar,
body[data-theme="nightPurple"] .event-card,
body[data-theme="nightPurple"] .trust-footer,
body[data-theme="nightPurple"] .member-card,
body[data-theme="nightPurple"] .faq-item,
body[data-theme="nightPurple"] .contact-footer {
  background: var(--color-surface);
}

@media (min-width: 768px) {
  .detail-sheet__panel, .register-sheet__panel {
    left: 50%; right: auto; width: min(520px, 92vw);
    transform: translate(-50%, 100%);
  }
  .detail-sheet.is-open .detail-sheet__panel,
  .register-sheet.is-open .register-sheet__panel { transform: translate(-50%, 0); }
}

/* ── P1 模块 ── */
.event-card--flash { animation: cardFlash 1.2s ease; }
@keyframes cardFlash {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 0 0 3px var(--color-primary), var(--shadow); }
}

.calendar-view { padding: 0 16px 16px; }
.calendar-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 14px; font-weight: 600;
}
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  margin-bottom: 6px; text-align: center; font-size: 11px; color: #888;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day {
  padding: 8px 4px; border-radius: 10px; text-align: center;
  background: var(--color-surface); border: 1px solid rgba(0,0,0,.06);
  min-height: 52px;
}
.cal-day--muted { opacity: .45; }
.cal-day.has-event { background: color-mix(in srgb, var(--color-primary) 8%, #fff); }
.cal-day.is-selected { outline: 2px solid var(--color-primary); }
.cal-day:disabled { opacity: .35; cursor: default; }
.cal-day__num { display: block; font-size: 15px; font-weight: 700; }
.cal-day__dots { display: flex; justify-content: center; gap: 3px; margin-top: 4px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.cal-dot--track-day { background: var(--color-primary); }
.cal-dot--road-trip { background: #005BAC; }
.cal-dot--meetup { background: #FF9800; }
.cal-dot--annual { background: #9C27B0; }
.view-toggle-btn {
  margin-left: auto; padding: 6px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
}
.calendar-popup {
  margin-top: 14px; padding: 14px; border-radius: var(--radius);
  background: var(--color-surface); box-shadow: var(--shadow);
}
.calendar-popup h3 { margin: 0 0 10px; font-size: 15px; }
.calendar-popup__item {
  display: block; width: 100%; text-align: left; padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06); background: none;
}
.calendar-popup__item strong { display: block; font-size: 14px; }
.calendar-popup__item span { font-size: 12px; color: #888; }

.leaderboard-section, .recall-wall, .stats-dashboard, .member-profile, .subscribe-section { padding: 8px 16px 16px; }
.leaderboard-list { display: grid; gap: 8px; }
.lb-row, .lb-me {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--radius); background: var(--color-surface);
  box-shadow: var(--shadow);
}
.lb-row--top { border-left: 4px solid var(--color-accent); }
.lb-row--rank-1 { background: linear-gradient(90deg, rgba(255,215,0,.15), #fff); }
.lb-row--rank-2 { background: linear-gradient(90deg, rgba(192,192,192,.2), #fff); }
.lb-row--rank-3 { background: linear-gradient(90deg, rgba(205,127,50,.15), #fff); }
.lb-me {
  margin-top: 10px; border: 2px solid var(--color-primary);
  position: sticky; bottom: calc(var(--contact-h) + 8px); z-index: 5;
}
.lb-rank { min-width: 32px; font-weight: 700; text-align: center; }
.lb-avatar { border-radius: 50%; object-fit: cover; }
.lb-info { flex: 1; min-width: 0; }
.lb-info strong { display: block; font-size: 14px; }
.lb-info span { font-size: 12px; color: #888; }
.lb-time { font-family: ui-monospace, monospace; font-weight: 700; color: var(--color-primary); }

.stats-card {
  background: var(--color-surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.stats-bar-row {
  display: grid; grid-template-columns: 72px 1fr 36px; gap: 8px;
  align-items: center; margin-bottom: 8px; font-size: 13px;
}
.stats-bar { height: 8px; border-radius: 999px; background: var(--color-light-gray); overflow: hidden; }
.stats-bar__fill { height: 100%; background: var(--color-primary); border-radius: inherit; }
.stats-summary { margin: 14px 0; font-size: 14px; }
.stats-trend { font-size: 12px; color: #888; }
.stats-avatars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-av { text-align: center; font-size: 11px; }
.stats-av img { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 4px; object-fit: cover; }

.member-profile-card {
  background: var(--color-surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.mp-head { display: flex; gap: 14px; align-items: flex-start; }
.mp-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mp-meta { font-size: 12px; color: #888; margin-top: 6px; }
.mp-history { margin: 14px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.8; }

.recall-filters { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding: 0 0 4px; }
.masonry { columns: 2; column-gap: 10px; }
@media (min-width: 640px) { .masonry { columns: 3; } }
.masonry-item {
  break-inside: avoid; margin-bottom: 10px; width: 100%;
  border-radius: var(--radius); overflow: hidden; position: relative;
  padding: 0; border: none; background: #000; display: block;
}
.masonry-item img, .masonry-item video { width: 100%; display: block; }
.masonry-item__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px; font-size: 11px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.masonry-item--video { background: #111; }

.subscribe-card {
  background: var(--color-surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.subscribe-hint { margin: -8px 0 14px; font-size: 13px; color: #666; }
.subscribe-form label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.subscribe-form input, .subscribe-form select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px; font-size: 15px;
}
.subscribe-check { font-weight: 400; display: flex; align-items: center; gap: 8px; }
.subscribe-check input { width: auto; margin: 0; }
.subscribe-msg { font-size: 14px; color: #c62828; margin-top: 8px; }
.subscribe-msg.is-success { color: var(--color-register); }
.ics-quick { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.08); }
.ics-quick p { margin: 0 0 10px; font-size: 13px; }
.btn--ics { margin: 0 6px 6px 0; }

.detail-tools { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.detail-tools .btn { flex: 1; min-width: 120px; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center;
}
.lightbox__img { max-width: 92vw; max-height: 80vh; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 16px; right: 16px; color: #fff; font-size: 32px;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 40px; padding: 12px;
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox__caption {
  position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #fff;
}

.poster-modal {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.poster-modal__sheet {
  background: #fff; border-radius: var(--radius); padding: 16px;
  max-width: 420px; width: 100%; max-height: 92vh; overflow-y: auto;
}
.poster-modal__close {
  float: right; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.06); font-size: 20px;
}
.poster-modal__sheet h3 { margin: 0 0 12px; text-align: center; }
.poster-modal__sheet canvas { width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; }
