/**
 * Portal — App-shell + Components
 * Imports tokens.css. Global reset, app frame, common UI building blocks.
 */
@import url('./tokens.css');
@import url('./panda.css');

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--p-font-sans);
  font-size: var(--p-text-base);
  line-height: var(--p-leading-normal);
  color: var(--p-text);
  background: var(--p-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
input, button, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* -------- App Shell -------- */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--p-bg);
}
.app-shell__main {
  flex: 1;
  padding-bottom: calc(var(--p-tabbar-h) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 1024px) {
  .app-shell__main { padding-bottom: var(--p-space-9); }
}

/* container — phone first, on desktop center to app width */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--p-space-4);
}
@media (min-width: 768px)  { .container { padding: 0 var(--p-space-6); } }
@media (min-width: 1024px) { .container { max-width: var(--p-content-max); padding: 0 var(--p-space-7); } }

/* phone-shaped centered frame for /me / /login when desktop */
.app-frame {
  width: 100%;
  max-width: var(--p-app-max);
  margin: 0 auto;
}

/* -------- App Header (sticky) -------- */
.app-header {
  position: sticky; top: 0;
  z-index: var(--p-z-sticky);
  height: var(--p-header-h);
  display: flex; align-items: center;
  padding: 0 var(--p-space-4);
  background: var(--p-bg-elevated);
  border-bottom: 1px solid var(--p-border-soft);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.app-header__title { font-size: var(--p-text-lg); font-weight: 600; flex: 1; text-align: center; }
.app-header__nav {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--p-radius-md);
  color: var(--p-text);
  transition: background var(--p-dur-quick) var(--p-ease-out);
}
.app-header__nav:hover, .app-header__nav:focus-visible { background: var(--p-bg-tinted); }
.app-header__nav:active { transform: scale(0.96); }

/* hero gradient header — used on home / me */
.hero {
  background: var(--p-grad-hero);
  color: var(--p-text-on-brand);
  padding: var(--p-space-7) var(--p-space-4) var(--p-space-9);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: -40% -20% auto auto;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero__row { display: flex; align-items: center; gap: var(--p-space-4); position: relative; }
.hero__greet { flex: 1; min-width: 0; }
.hero__greet h1 { margin: 0 0 4px; font-size: var(--p-text-2xl); font-weight: 700; }
.hero__greet p  { margin: 0; opacity: 0.85; font-size: var(--p-text-sm); }

/* -------- Bottom Tab Bar -------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--p-tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--p-bg-elevated);
  border-top: 1px solid var(--p-border-soft);
  display: flex; justify-content: space-around;
  z-index: var(--p-z-tabbar);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--p-text-muted);
  font-size: 11px; font-weight: 500;
  transition: color var(--p-dur-quick) var(--p-ease-out);
  min-height: var(--p-tap);
}
.tabbar__item.active { color: var(--p-brand-500); }
.tabbar__item:active { transform: scale(0.92); }
.tabbar__item svg { width: 24px; height: 24px; }
@media (min-width: 1024px) {
  .tabbar { display: none; }
}

/* desktop top-nav alternative */
.topnav {
  display: none;
  position: sticky; top: 0;
  z-index: var(--p-z-sticky);
  height: var(--p-header-h);
  background: var(--p-bg-elevated);
  border-bottom: 1px solid var(--p-border-soft);
  align-items: center;
  padding: 0 var(--p-space-7);
}
.topnav__brand { display: flex; align-items: center; gap: var(--p-space-3); font-weight: 700; font-size: var(--p-text-lg); }
.topnav__items { display: flex; gap: var(--p-space-2); margin-left: var(--p-space-7); flex: 1; }
.topnav__items a {
  padding: 8px 14px; border-radius: var(--p-radius-md);
  font-size: var(--p-text-sm); font-weight: 500; color: var(--p-text-soft);
  transition: all var(--p-dur-quick) var(--p-ease-out);
}
.topnav__items a:hover { background: var(--p-bg-tinted); color: var(--p-text); }
.topnav__items a.active { background: var(--p-brand-50); color: var(--p-brand-600); }
.topnav__user { display: flex; align-items: center; gap: var(--p-space-3); }
@media (min-width: 1024px) { .topnav { display: flex; } }

/* -------- Cards -------- */
.card {
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius-lg);
  padding: var(--p-space-5);
  box-shadow: var(--p-shadow-xs);
  transition: transform var(--p-dur-base) var(--p-ease-out),
              box-shadow var(--p-dur-base) var(--p-ease-out);
}
.card--clickable:hover { box-shadow: var(--p-shadow-md); transform: translateY(-2px); }
.card--clickable:active { transform: translateY(0) scale(0.99); }
.card--gradient {
  background: var(--p-grad-card);
  border: 0;
}
.card--brand {
  background: var(--p-grad-hero); color: var(--p-text-on-brand); border: 0;
  box-shadow: var(--p-shadow-glow);
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--p-space-2);
  min-height: var(--p-tap);
  padding: 0 var(--p-space-5);
  border-radius: var(--p-radius-md);
  font-size: var(--p-text-md); font-weight: 600;
  transition: all var(--p-dur-quick) var(--p-ease-out);
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--p-brand-300); outline-offset: 2px; }
.btn--primary {
  background: var(--p-brand-500); color: var(--p-text-on-brand);
  box-shadow: var(--p-shadow-sm);
}
.btn--primary:hover { background: var(--p-brand-600); box-shadow: var(--p-shadow-md); }
.btn--gradient {
  background: var(--p-grad-hero); color: var(--p-text-on-brand);
  box-shadow: var(--p-shadow-glow);
}
.btn--secondary { background: var(--p-bg-tinted); color: var(--p-text); }
.btn--secondary:hover { background: var(--p-border-soft); }
.btn--ghost { background: transparent; color: var(--p-brand-500); }
.btn--ghost:hover { background: var(--p-brand-50); }
.btn--danger { background: var(--p-danger-500); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 var(--p-space-3); font-size: var(--p-text-sm); border-radius: var(--p-radius-sm); }
.btn--lg { min-height: 52px; padding: 0 var(--p-space-7); font-size: var(--p-text-lg); border-radius: var(--p-radius-lg); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }

/* -------- Inputs -------- */
.field { display: block; margin-bottom: var(--p-space-4); }
.field__label { display: block; font-size: var(--p-text-sm); font-weight: 600; margin-bottom: var(--p-space-2); color: var(--p-text-soft); }
.field__hint  { display: block; font-size: var(--p-text-xs); color: var(--p-text-muted); margin-top: 6px; }
.field__error { display: block; font-size: var(--p-text-xs); color: var(--p-danger-500); margin-top: 6px; }

.input, .textarea, .select {
  width: 100%;
  min-height: var(--p-tap);
  padding: 0 var(--p-space-4);
  border: 1.5px solid var(--p-border);
  border-radius: var(--p-radius-md);
  background: var(--p-bg-elevated);
  font-size: var(--p-text-md);
  color: var(--p-text);
  transition: border-color var(--p-dur-quick) var(--p-ease-out),
              box-shadow var(--p-dur-quick) var(--p-ease-out);
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--p-text-muted); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--p-brand-400);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}
.textarea { min-height: 96px; padding: var(--p-space-3) var(--p-space-4); resize: vertical; }

.input-group { display: flex; gap: var(--p-space-2); }
.input-group .input { flex: 1; }

/* -------- Chips / Pills -------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  background: var(--p-bg-tinted);
  color: var(--p-text-soft);
  border-radius: var(--p-radius-full);
  font-size: var(--p-text-sm); font-weight: 500;
  transition: all var(--p-dur-quick) var(--p-ease-out);
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
}
.chip:hover { background: var(--p-border-soft); }
.chip.active { background: var(--p-brand-500); color: #fff; box-shadow: var(--p-shadow-sm); }
.chip__count { opacity: 0.7; font-weight: 700; }

/* status badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: var(--p-radius-sm);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.badge--success { background: var(--p-success-50);  color: var(--p-success-500); }
.badge--info    { background: var(--p-info-50);     color: var(--p-info-500);    }
.badge--warn    { background: var(--p-warning-50);  color: var(--p-warning-500); }
.badge--danger  { background: var(--p-danger-50);   color: var(--p-danger-500);  }
.badge--brand   { background: var(--p-brand-50);    color: var(--p-brand-600);   }
.badge--neutral { background: var(--p-bg-tinted);   color: var(--p-text-soft);   }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* -------- Lists -------- */
.list { display: flex; flex-direction: column; gap: var(--p-space-3); }
.list--tight { gap: var(--p-space-2); }

/* horizontal scroll row */
.scroll-x {
  display: flex; gap: var(--p-space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--p-space-4) 4px;
  margin: 0 calc(-1 * var(--p-space-4));
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex: 0 0 auto; }

/* -------- Section title -------- */
.section { margin-top: var(--p-space-7); }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--p-space-3); }
.section__title { font-size: var(--p-text-lg); font-weight: 700; margin: 0; }
.section__more  { font-size: var(--p-text-sm); color: var(--p-brand-500); }

/* -------- Skeletons -------- */
.skel {
  background: linear-gradient(90deg, var(--p-bg-tinted) 25%, var(--p-border-soft) 50%, var(--p-bg-tinted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--p-radius-sm);
}
.skel--line { height: 14px; margin-bottom: 8px; }
.skel--card { height: 132px; border-radius: var(--p-radius-lg); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* -------- Empty state -------- */
.empty { text-align: center; padding: var(--p-space-9) var(--p-space-4); color: var(--p-text-muted); }
.empty__title { font-size: var(--p-text-md); font-weight: 600; color: var(--p-text-soft); margin: var(--p-space-3) 0 4px; }
.empty__desc  { font-size: var(--p-text-sm); margin: 0 0 var(--p-space-4); }

/* -------- Toast -------- */
.portal-toast {
  position: fixed; left: 50%; bottom: calc(var(--p-tabbar-h) + 24px);
  transform: translateX(-50%) translateY(20px);
  z-index: var(--p-z-toast);
  padding: 12px 18px; border-radius: var(--p-radius-md);
  background: rgba(15,23,42,0.92); color: #fff;
  font-size: var(--p-text-sm); font-weight: 500;
  box-shadow: var(--p-shadow-lg); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--p-dur-base) var(--p-ease-out), transform var(--p-dur-base) var(--p-ease-out);
  max-width: calc(100vw - 32px);
}
.portal-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.portal-toast[data-type="success"] { background: var(--p-success-500); }
.portal-toast[data-type="error"]   { background: var(--p-danger-500); }
.portal-toast[data-type="warning"] { background: var(--p-warning-500); }

/* -------- Modal / Sheet -------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: var(--p-bg-overlay);
  z-index: var(--p-z-overlay); opacity: 0; pointer-events: none;
  transition: opacity var(--p-dur-base) var(--p-ease-out);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: var(--p-z-modal);
  background: var(--p-bg-elevated);
  border-radius: var(--p-radius-2xl) var(--p-radius-2xl) 0 0;
  padding: var(--p-space-5) var(--p-space-5) calc(var(--p-space-7) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform var(--p-dur-slow) var(--p-ease-out), visibility 0s var(--p-dur-slow);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  max-height: 80vh; overflow-y: auto;
  visibility: hidden;
}
.sheet.open { transform: translateY(0); visibility: visible; transition: transform var(--p-dur-slow) var(--p-ease-out), visibility 0s; }
.sheet__handle { width: 40px; height: 4px; background: var(--p-border-strong); border-radius: var(--p-radius-full); margin: 0 auto var(--p-space-4); }
@media (min-width: 768px) {
  .sheet { left: 50%; right: auto; transform: translate(-50%, 100%); width: 480px; max-width: calc(100vw - 32px); border-radius: var(--p-radius-2xl); bottom: 24px; }
  .sheet.open { transform: translate(-50%, 0); visibility: visible; transition: transform var(--p-dur-slow) var(--p-ease-out), visibility 0s; }
}

/* -------- Avatar -------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--p-grad-hero); color: var(--p-text-on-brand);
  border-radius: var(--p-radius-full);
  font-weight: 700; overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 32px; height: 32px; font-size: 13px; }
.avatar--md { width: 44px; height: 44px; font-size: 15px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.avatar--xl { width: 88px; height: 88px; font-size: 30px; box-shadow: var(--p-shadow-md); }

/* -------- Stat ring (5-bucket on me page) -------- */
.stat-ring {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: var(--p-text-soft);
  flex: 1; min-width: 0;
}
.stat-ring__icon {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--p-bg-tinted);
  transition: transform var(--p-dur-quick) var(--p-ease-spring);
}
.stat-ring:active .stat-ring__icon { transform: scale(0.94); }
.stat-ring__icon svg { width: 26px; height: 26px; }
.stat-ring__count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--p-radius-full);
  background: var(--p-danger-500); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--p-bg);
}
.stat-ring__label { font-size: var(--p-text-xs); font-weight: 500; }
/* per-bucket tint */
.stat-ring[data-bucket="pending_review"] .stat-ring__icon { background: var(--p-warning-50); color: var(--p-warning-500); }
.stat-ring[data-bucket="paying"]         .stat-ring__icon { background: var(--p-info-50);    color: var(--p-info-500);    }
.stat-ring[data-bucket="joining"]        .stat-ring__icon { background: var(--p-brand-50);   color: var(--p-brand-500);   }
.stat-ring[data-bucket="completed"]      .stat-ring__icon { background: var(--p-success-50); color: var(--p-success-500); }
.stat-ring[data-bucket="rejected"]       .stat-ring__icon { background: var(--p-bg-tinted);  color: var(--p-text-muted);  }

/* -------- Menu list (me page) -------- */
.menu-list { background: var(--p-bg-elevated); border-radius: var(--p-radius-lg); overflow: hidden; box-shadow: var(--p-shadow-xs); }
.menu-item {
  display: flex; align-items: center; gap: var(--p-space-4);
  padding: var(--p-space-4); min-height: var(--p-tap);
  border-bottom: 1px solid var(--p-border-soft);
  cursor: pointer;
  transition: background var(--p-dur-quick) var(--p-ease-out);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: var(--p-bg-tinted); }
.menu-item:active { background: var(--p-border-soft); }
.menu-item__icon {
  width: 36px; height: 36px; border-radius: var(--p-radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--p-bg-tinted); color: var(--p-text-soft);
}
.menu-item__icon svg { width: 20px; height: 20px; }
.menu-item__label { flex: 1; font-size: var(--p-text-md); font-weight: 500; }
.menu-item__chevron { color: var(--p-text-muted); }
.menu-item--danger { color: var(--p-danger-500); }
.menu-item--danger .menu-item__icon { background: var(--p-danger-50); color: var(--p-danger-500); }

/* -------- Search input -------- */
.search {
  position: relative;
  width: 100%;
}
.search__input {
  width: 100%;
  height: 44px;
  padding: 0 var(--p-space-4) 0 44px;
  border: 0;
  border-radius: var(--p-radius-full);
  background: var(--p-bg-elevated);
  font-size: var(--p-text-md);
  color: var(--p-text);
  box-shadow: var(--p-shadow-sm);
  outline: none;
}
.search__input::placeholder { color: var(--p-text-muted); }
.search__input:focus { box-shadow: var(--p-shadow-md), 0 0 0 4px rgba(124, 58, 237, 0.12); }
.search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--p-text-muted); }

/* -------- Spinner -------- */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { border: 2px solid var(--p-border); border-top-color: var(--p-brand-500); border-radius: 50%; width: 24px; height: 24px; animation: spin 0.8s linear infinite; }

/* -------- Utilities -------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--p-space-2); }
.gap-3 { gap: var(--p-space-3); }
.gap-4 { gap: var(--p-space-4); }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* line clamp */
.clamp-1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* spacing utilities */
.mt-1 { margin-top: var(--p-space-1); } .mt-2 { margin-top: var(--p-space-2); } .mt-3 { margin-top: var(--p-space-3); } .mt-4 { margin-top: var(--p-space-4); } .mt-5 { margin-top: var(--p-space-5); } .mt-6 { margin-top: var(--p-space-6); } .mt-7 { margin-top: var(--p-space-7); }
.mb-2 { margin-bottom: var(--p-space-2); } .mb-3 { margin-bottom: var(--p-space-3); } .mb-4 { margin-bottom: var(--p-space-4); } .mb-5 { margin-bottom: var(--p-space-5); } .mb-6 { margin-bottom: var(--p-space-6); }
.p-4 { padding: var(--p-space-4); } .p-5 { padding: var(--p-space-5); } .p-6 { padding: var(--p-space-6); }

/* -------- Cover fallback icon (cards w/o cover_url) -------- */
.joining-card__cover-icon,
.rec-card__cover-icon,
.meeting-card__cover-icon,
.order-card__cover-icon {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: rgba(255, 255, 255, 0.55);
}
.order-card__cover-icon { color: rgba(255, 255, 255, 0.7); }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================
   HOME PAGE — v2 Design System additions
   Only adds new classes; never overrides existing ones.
   ================================================================ */

/* ---- New token extensions (home only) ---- */
:root {
  --p-live-500:    #EF4444;
  --p-live-50:     #FEE2E2;
  --p-soon-500:    #F59E0B;
  --p-soon-50:     #FEF3C7;
  --p-ended-500:   #94A3B8;
  --p-ended-50:    #F1F5F9;

  --p-hero-h-mobile:  260px;
  --p-hero-h-desktop: 320px;

  /* glass card */
  --p-glass-bg:    rgba(255,255,255,0.10);
  --p-glass-border: rgba(255,255,255,0.18);

  /* card rail — 280px lets second card peek (~75px hint) at 360px viewport */
  --p-rail-card-w:  280px;
  --p-rail-card-h:  168px;
}

/* ================================================================
   HERO v2 — Full-bleed immersive with ambient blobs + spotlight
   ================================================================ */
.hero-v2 {
  position: relative;
  background: var(--p-grad-hero);
  color: var(--p-text-on-brand);
  min-height: var(--p-hero-h-mobile);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 0;
}

/* ambient blob 1 */
.hero-v2__blob1 {
  position: absolute;
  top: -80px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.35) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift1 8s ease-in-out infinite alternate;
}
/* ambient blob 2 */
.hero-v2__blob2 {
  position: absolute;
  bottom: -40px; left: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.28) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift2 10s ease-in-out infinite alternate;
}
@keyframes blob-drift1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(20px,-20px) scale(1.08); }
}
@keyframes blob-drift2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-16px,18px) scale(1.05); }
}

/* top bar inside hero */
.hero-v2__topbar {
  position: relative;
  /* z 50 > greet-wrap (z 2),让 locale dropdown 不被 hero 主体内容遮挡 */
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--p-space-5) 0;
  min-height: 52px;
}
.hero-v2__topbar-brand {
  display: flex; align-items: center; gap: var(--p-space-2);
  font-size: var(--p-text-sm); font-weight: 700; opacity: 0.9;
  letter-spacing: -0.01em;
}
.hero-v2__topbar-brand-dot {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.hero-v2__topbar-actions {
  display: flex; align-items: center; gap: var(--p-space-2);
}

/* greeting block */
.hero-v2__greet-wrap {
  position: relative;
  z-index: 2;
  padding: var(--p-space-5) var(--p-space-5) 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--p-space-3);
}
.hero-v2__greeting {
  flex: 1; min-width: 0;
}
.hero-v2__greeting-hi {
  font-size: var(--p-text-xs);
  opacity: 0.72;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.hero-v2__greeting-name {
  font-size: var(--p-text-2xl);
  font-weight: 800;
  line-height: var(--p-leading-tight);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-v2__greeting-sub {
  font-size: var(--p-text-xs);
  opacity: 0.68;
  font-weight: 500;
}

/* panda positioned top-right */
.hero-v2__panda {
  flex-shrink: 0;
  margin-top: 4px;
  pointer-events: none;
}

/* spotlight card — next event */
.hero-v2__spotlight-wrap {
  position: relative;
  z-index: 2;
  padding: var(--p-space-4) var(--p-space-5) var(--p-space-9);
  margin-top: var(--p-space-3);
}
.hero-v2__spotlight {
  background: var(--p-glass-bg);
  border: 1px solid var(--p-glass-border);
  border-radius: var(--p-radius-xl);
  padding: var(--p-space-4);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.15);
  text-decoration: none;
  display: block;
  color: inherit;
  transition: transform var(--p-dur-base) var(--p-ease-out),
              box-shadow var(--p-dur-base) var(--p-ease-out);
  cursor: pointer;
}
.hero-v2__spotlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.18);
}
.hero-v2__spotlight:active { transform: scale(0.98); }
.hero-v2__spotlight-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.7; margin-bottom: var(--p-space-2);
  display: flex; align-items: center; gap: 6px;
}
.hero-v2__spotlight-label-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--p-soon-500);
  flex-shrink: 0;
}
.hero-v2__spotlight-title {
  font-size: var(--p-text-md);
  font-weight: 700;
  line-height: var(--p-leading-tight);
  margin-bottom: var(--p-space-3);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.hero-v2__spotlight-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--p-space-2);
}
.hero-v2__spotlight-date {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--p-text-xs); opacity: 0.78; font-weight: 500;
}
.hero-v2__spotlight-countdown {
  display: flex; align-items: center; gap: 4px;
}
.hero-v2__countdown-chip {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 3px 7px;
  min-width: 36px;
}
.hero-v2__countdown-num {
  font-size: 13px; font-weight: 800;
  line-height: 1; font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.hero-v2__countdown-unit {
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; opacity: 0.65;
  letter-spacing: 0.04em; margin-top: 1px;
}
.hero-v2__countdown-sep {
  font-size: 14px; font-weight: 700; opacity: 0.5;
  margin-bottom: 6px; line-height: 1;
}

/* search inside hero v2 — lifted over the fold */
.hero-v2__search-wrap {
  padding: 0 var(--p-space-5);
  margin-top: calc(-1 * var(--p-space-8));
  position: relative; z-index: 3;
}
@media (min-width: 768px) {
  .hero-v2__search-wrap { padding: 0 var(--p-space-7); }
}
@media (min-width: 1024px) {
  .hero-v2__search-wrap {
    padding: 0 var(--p-space-7);
    max-width: var(--p-content-max);
    margin-left: auto; margin-right: auto;
  }
}

/* desktop topnav tweaks */
@media (min-width: 1024px) {
  .hero-v2__topbar { display: none; }  /* topnav replaces */
  .hero-v2__greet-wrap { padding: var(--p-space-6) var(--p-space-9) 0; }
  .hero-v2__greeting-name { font-size: var(--p-text-3xl); }
  .hero-v2__spotlight-wrap { padding: var(--p-space-4) var(--p-space-9) var(--p-space-10); }
  .hero-v2 { min-height: var(--p-hero-h-desktop); }
}

/* ================================================================
   HOME v2 JOINING RAIL — enhanced card design
   ================================================================ */
/* Joining rail: 横滑 + 右侧渐变提示 + 滚动条隐藏。
   外层 wrap 用 mask-image 在右边渐变到透明,暗示"还有更多内容,可以左滑" */
.joining-rail-wrap {
  position: relative;
  margin: 0 calc(-1 * var(--p-space-5));
}
.joining-rail-wrap__track {
  display: flex;
  gap: var(--p-space-3);
  padding: 0 var(--p-space-5) 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--p-space-5);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* 右侧渐变 mask:暗示更多 */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
}
.joining-rail-wrap__track::-webkit-scrollbar { display: none; }
.joining-rail-wrap__track > * { scroll-snap-align: start; flex: 0 0 auto; }
/* 当滚到末尾时(滚动到底)去除 mask,避免末张被裁 */
.joining-rail-wrap__track[data-scroll-end="true"] {
  -webkit-mask-image: none;
          mask-image: none;
}

/* 滚动指示点 — 移动端显示在 rail 下方 */
.joining-rail-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--p-space-3);
}
.joining-rail-dots__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--p-border-strong);
  transition: width var(--p-dur-quick) var(--p-ease-out),
              background var(--p-dur-quick) var(--p-ease-out);
}
.joining-rail-dots__dot.active {
  width: 18px;
  border-radius: 100px;
  background: var(--p-brand-500);
}
@media (min-width: 768px) {
  .joining-rail-dots { display: none; }  /* desktop 内容不会遮挡,无需指示 */
}

/* legacy alias — 保持不破坏其他引用 */
.joining-rail-wrap.scroll-x { overflow: visible; }

/* ============================================================
   Meeting register form — radio / checkbox 群组(对齐 admin 字段配置)
   ============================================================ */
.md-radio-group, .md-check-group {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.md-radio, .md-check {
  display: flex; align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--p-bg-tinted);
  border: 1.5px solid transparent;
  border-radius: var(--p-radius-md);
  cursor: pointer;
  font-size: var(--p-text-sm);
  transition: border-color var(--p-dur-quick), background var(--p-dur-quick);
}
.md-radio:hover, .md-check:hover { background: var(--p-border-soft); }
.md-radio:has(input:checked),
.md-check:has(input:checked) {
  background: var(--p-brand-50);
  border-color: var(--p-brand-300);
  color: var(--p-brand-700);
  font-weight: 600;
}
.md-radio input, .md-check input {
  flex-shrink: 0;
  width: 18px; height: 18px;
  accent-color: var(--p-brand-500);
}

/* ============================================================
   Protocol viewer — 协议(用户协议/隐私政策)弹层,login + about 共用
   ============================================================ */
.protocol-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: var(--p-z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--p-ease-out);
}
.protocol-backdrop.open { opacity: 1; pointer-events: auto; }

.protocol-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0; top: 0;
  z-index: var(--p-z-modal);
  background: var(--p-bg-elevated);
  visibility: hidden;
  transform: translateY(100%);
  transition: transform var(--p-dur-slow) var(--p-ease-out),
              visibility 0s linear var(--p-dur-slow);
  display: flex;
  flex-direction: column;
}
.protocol-sheet.open {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--p-dur-slow) var(--p-ease-out);
}
.protocol-sheet__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--p-space-3);
  padding: calc(var(--p-space-4) + env(safe-area-inset-top, 0px)) var(--p-space-4) var(--p-space-3);
  border-bottom: 1px solid var(--p-border-soft);
  background: var(--p-bg-elevated);
}
.protocol-sheet__close {
  width: 36px; height: 36px;
  border-radius: var(--p-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--p-text-soft);
  background: transparent;
  cursor: pointer;
}
.protocol-sheet__close:hover { background: var(--p-bg-tinted); }
.protocol-sheet__title {
  flex: 1;
  font-size: var(--p-text-lg);
  font-weight: 700;
  color: var(--p-text);
  margin: 0;
}
.protocol-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--p-space-5) var(--p-space-5) calc(var(--p-space-7) + env(safe-area-inset-bottom, 0px));
  color: var(--p-text);
  font-size: var(--p-text-base);
  line-height: var(--p-leading-relaxed);
}
.protocol-sheet__body h1, .protocol-sheet__body h2, .protocol-sheet__body h3 {
  color: var(--p-text); margin: var(--p-space-5) 0 var(--p-space-3);
}
.protocol-sheet__body h1 { font-size: var(--p-text-xl); }
.protocol-sheet__body h2 { font-size: var(--p-text-lg); }
.protocol-sheet__body h3 { font-size: var(--p-text-md); }
.protocol-sheet__body p { margin: 0 0 var(--p-space-4); }
.protocol-sheet__body ul, .protocol-sheet__body ol { padding-left: var(--p-space-6); margin: 0 0 var(--p-space-4); }
.protocol-sheet__body li { margin-bottom: var(--p-space-2); }
.protocol-sheet__body a { color: var(--p-brand-500); }
.protocol-sheet__empty {
  text-align: center;
  padding: var(--p-space-9) var(--p-space-4);
  color: var(--p-text-muted);
  font-size: var(--p-text-sm);
}
.protocol-sheet__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--p-space-9);
}
@media (min-width: 768px) {
  .protocol-sheet {
    top: 5vh; bottom: 5vh; left: 50%;
    right: auto;
    width: min(720px, 92vw);
    transform: translate(-50%, 100%);
    border-radius: var(--p-radius-2xl);
    box-shadow: var(--p-shadow-xl);
    max-height: 90vh;
  }
  .protocol-sheet.open { transform: translate(-50%, 0); }
}

/* ============================================================
   Check-in QR Sheet — 出示自己的签到码给现场工作人员扫
   ============================================================ */
.checkin-qr-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--p-z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--p-ease-out);
}
.checkin-qr-backdrop.open { opacity: 1; pointer-events: auto; }

.checkin-qr-sheet {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: var(--p-z-modal);
  width: min(360px, calc(100vw - 32px));
  background: var(--p-bg-elevated);
  border-radius: var(--p-radius-2xl);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.4);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 18px)) scale(0.96);
  transition: opacity 220ms var(--p-ease-out), transform 260ms var(--p-ease-spring);
  overflow: hidden;
}
.checkin-qr-sheet.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.checkin-qr-sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--p-space-4) var(--p-space-5);
  border-bottom: 1px solid var(--p-border-soft);
}
.checkin-qr-sheet__title {
  font-size: var(--p-text-md);
  font-weight: 700;
  color: var(--p-text);
  margin: 0;
}
.checkin-qr-sheet__close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--p-radius-md);
  background: transparent;
  color: var(--p-text-soft);
  cursor: pointer;
}
.checkin-qr-sheet__close:hover { background: var(--p-bg-tinted); }
.checkin-qr-sheet__body {
  padding: var(--p-space-5);
  text-align: center;
}
.checkin-qr-sheet__hint {
  font-size: var(--p-text-sm);
  color: var(--p-text-soft);
  margin-bottom: var(--p-space-4);
}
.checkin-qr-sheet__qr {
  display: inline-block;
  background: #fff;
  padding: 12px;
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-sm);
  margin-bottom: var(--p-space-4);
}
.checkin-qr-sheet__qr img { display: block; max-width: 100%; height: auto; }
.checkin-qr-sheet__meeting {
  font-size: var(--p-text-md);
  font-weight: 700;
  color: var(--p-text);
  margin-bottom: 4px;
  word-break: break-word;
}
.checkin-qr-sheet__order {
  font-size: var(--p-text-xs);
  color: var(--p-text-muted);
  font-family: var(--p-font-mono);
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .checkin-qr-sheet,
  .checkin-qr-backdrop {
    transition: opacity 80ms linear;
    transform: translate(-50%, -50%);
  }
}

/* ============================================================
   Logout Confirm Modal — portal-style 危险操作确认
   ============================================================ */
.logout-confirm-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--p-z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--p-ease-out);
}
.logout-confirm-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.logout-confirm {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: var(--p-z-modal);
  width: min(360px, calc(100vw - 32px));
  background: var(--p-bg-elevated);
  border-radius: var(--p-radius-2xl);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35), 0 8px 16px rgba(15, 23, 42, 0.12);
  padding: var(--p-space-7) var(--p-space-6) var(--p-space-6);
  text-align: center;
  /* 进入:从下方滑入 + scale 一点点 */
  opacity: 0;
  transform: translate(-50%, calc(-50% + 18px)) scale(0.96);
  transition: opacity 220ms var(--p-ease-out), transform 260ms var(--p-ease-spring);
}
.logout-confirm.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.logout-confirm__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--p-danger-50);
  color: var(--p-danger-500);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto var(--p-space-5);
  /* 柔光 + 微脉冲突显警示 */
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08);
}
.logout-confirm__icon svg { width: 26px; height: 26px; }

.logout-confirm__title {
  font-size: var(--p-text-lg);
  font-weight: 700;
  color: var(--p-text);
  margin: 0 0 var(--p-space-2);
  letter-spacing: -0.01em;
}
.logout-confirm__desc {
  font-size: var(--p-text-sm);
  color: var(--p-text-soft);
  line-height: var(--p-leading-relaxed);
  margin: 0 0 var(--p-space-6);
}
.logout-confirm__actions {
  display: flex;
  flex-direction: column;
  gap: var(--p-space-2);
}
.logout-confirm__actions .btn { width: 100%; }
.logout-confirm__actions .btn--danger {
  background: var(--p-danger-500);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.32);
}
.logout-confirm__actions .btn--danger:hover { background: #dc2626; }
.logout-confirm__actions .btn--danger:focus-visible { outline: 3px solid rgba(239,68,68,0.4); outline-offset: 2px; }
.logout-confirm__actions .btn--secondary { background: var(--p-bg-tinted); color: var(--p-text); }

@media (min-width: 640px) {
  .logout-confirm__actions {
    flex-direction: row-reverse;  /* desktop: 危险按钮在右(主操作惯例)*/
  }
  .logout-confirm__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .logout-confirm,
  .logout-confirm-backdrop {
    transition: opacity 80ms linear;
    transform: translate(-50%, -50%);
  }
}

/* CRITICAL — 确保 rail 真正可滚动:
   父级 .home-v2-sections 是 grid,默认 grid item 有 min-width: auto,
   会让 .section-v2 拉伸到 fit children(包括 5+ 张 280px 卡片 = 1488px 宽),
   导致 section 整体超出 grid track 1009px,反而 track 自身 scrollWidth=clientWidth
   而无 overflow → 滚动条不出现。
   修法:section-v2 + 内部 wrap 强制 min-width: 0 让 grid 真正约束宽度。 */
.home-v2-sections > .section-v2 {
  min-width: 0;
}
.section-v2 .joining-rail-wrap,
.section-v2 .joining-rail-wrap__track {
  min-width: 0;
  max-width: 100%;
}

/* 左右导航箭头 — desktop / tablet 显示,mobile 隐藏(touch 直接 swipe) */
.joining-rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--p-border);
  box-shadow: var(--p-shadow-md);
  cursor: pointer;
  display: none;       /* default mobile hidden */
  align-items: center; justify-content: center;
  color: var(--p-text);
  z-index: 5;
  transition: opacity var(--p-dur-quick) var(--p-ease-out),
              transform var(--p-dur-quick) var(--p-ease-out),
              box-shadow var(--p-dur-quick) var(--p-ease-out);
}
.joining-rail-arrow:hover {
  background: #fff;
  box-shadow: var(--p-shadow-lg);
  transform: translateY(-50%) scale(1.05);
}
.joining-rail-arrow:active { transform: translateY(-50%) scale(0.96); }
.joining-rail-arrow:disabled,
.joining-rail-arrow[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.joining-rail-arrow--prev { left: 6px; }
.joining-rail-arrow--next { right: 6px; }
@media (min-width: 768px) {
  .joining-rail-arrow { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .joining-rail-arrow { transition: none; }
}

/* v2 joining card — bigger, richer */
.jcard-v2 {
  width: var(--p-rail-card-w);
  height: var(--p-rail-card-h);
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
  text-decoration: none;
  display: block;
  box-shadow: var(--p-shadow-md);
  transition: transform var(--p-dur-base) var(--p-ease-out),
              box-shadow var(--p-dur-base) var(--p-ease-out);
}
.jcard-v2:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--p-shadow-xl); }
.jcard-v2:active { transform: scale(0.97); transition-duration: 100ms; }

/* cover (image or gradient) */
.jcard-v2__bg {
  position: absolute; inset: 0;
  background: var(--p-grad-hero);
}
.jcard-v2__bg img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
/* gradient overlays for text legibility */
.jcard-v2__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10,15,30,0.05) 0%,
    rgba(10,15,30,0.55) 65%,
    rgba(10,15,30,0.85) 100%
  );
}
/* pattern texture (no image, geometric) */
.jcard-v2__pattern {
  position: absolute; inset: 0;
  opacity: 0.07;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.8) 0, rgba(255,255,255,0.8) 1px,
    transparent 0, transparent 50%
  );
  background-size: 12px 12px;
}

/* status accent bar — left edge */
.jcard-v2__status-bar {
  position: absolute;
  top: 10px; bottom: 10px; left: 0;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--p-soon-500);
}
.jcard-v2--live .jcard-v2__status-bar { background: var(--p-live-500); }
.jcard-v2--ended .jcard-v2__status-bar { background: rgba(255,255,255,0.25); }

/* body content */
.jcard-v2__body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--p-space-3) var(--p-space-4) var(--p-space-3) var(--p-space-5);
  color: #fff;
}
.jcard-v2__badge-row {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px;
}
.jcard-v2__status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px;
  border-radius: 100px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
}
.jcard-v2__status-pill--live {
  background: rgba(239,68,68,0.85);
  color: #fff;
}
.jcard-v2__status-pill--live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  animation: live-pulse 1.2s ease-in-out infinite;
}
.jcard-v2__status-pill--soon {
  background: rgba(245,158,11,0.85);
  color: #fff;
}
.jcard-v2__status-pill--open {
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
}
.jcard-v2__status-pill--ended {
  background: rgba(148,163,184,0.55);
  color: #fff;
}
.jcard-v2__title {
  font-size: var(--p-text-sm); font-weight: 700;
  line-height: var(--p-leading-tight);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  margin-bottom: 4px;
}
.jcard-v2__date {
  font-size: 11px; opacity: 0.72; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}

/* top-right count pill (when >1 event) */
.jcard-v2__count {
  position: absolute; top: var(--p-space-3); right: var(--p-space-3);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  height: 20px; padding: 0 8px;
  font-size: 10px; font-weight: 700; color: #fff;
  display: flex; align-items: center;
  backdrop-filter: blur(6px);
}

/* joining section skeleton v2 */
.joining-skel-v2 {
  display: flex; gap: var(--p-space-3);
  padding: 0 var(--p-space-5) var(--p-space-1);
  margin: 0 calc(-1 * var(--p-space-5));
  overflow: hidden;
}
.joining-skel-v2__item {
  flex: 0 0 var(--p-rail-card-w);
  height: var(--p-rail-card-h);
  border-radius: var(--p-radius-xl);
}

/* ================================================================
   HOME v2 RECOMMEND GRID — masonry-feel with feature card
   ================================================================ */
.rec-grid-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--p-space-4);
}
@media (min-width: 640px) {
  .rec-grid-v2 { grid-template-columns: 1fr 1fr; }
  /* first card spans 2 cols as feature card */
  .rec-grid-v2 > .rec-card-v2:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .rec-grid-v2 { grid-template-columns: 1fr 1fr 1fr; }
  .rec-grid-v2 > .rec-card-v2:first-child { grid-column: 1 / 3; }
}

/* base rec card v2 */
.rec-card-v2 {
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border-soft);
  box-shadow: var(--p-shadow-sm);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--p-dur-base) var(--p-ease-out),
              box-shadow var(--p-dur-base) var(--p-ease-out);
  cursor: pointer;
}
.rec-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--p-shadow-lg), 0 0 0 1px var(--p-border);
}
.rec-card-v2:active { transform: scale(0.99); transition-duration: 100ms; }
.rec-card-v2:focus-visible {
  outline: 3px solid var(--p-brand-300);
  outline-offset: 2px;
}

/* cover — 16:9 on tablet+, 优化 mobile 减低高度避免占据卡片大半 */
.rec-card-v2__cover {
  aspect-ratio: 5 / 2;     /* mobile: 短而宽,信息区占比更高 */
  position: relative; overflow: hidden;
  background: var(--p-grad-hero);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45);
}
@media (min-width: 640px) {
  .rec-card-v2__cover { aspect-ratio: 16 / 9; }
}
/* feature card 仍宽屏 16:7 — 不用极端 21:9(防止过窄) */
.rec-card-v2:first-child .rec-card-v2__cover { aspect-ratio: 21 / 9; }
@media (min-width: 640px) {
  .rec-card-v2:first-child .rec-card-v2__cover { aspect-ratio: 21 / 9; }
}

.rec-card-v2__cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.rec-card-v2__cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,15,30,0.7) 0%,
    rgba(10,15,30,0.0) 55%
  );
}
/* badge row on cover */
.rec-card-v2__cover-badges {
  position: absolute;
  bottom: var(--p-space-3); left: var(--p-space-4);
  display: flex; gap: 6px; align-items: center;
  z-index: 2;
}

/* coloured accent line under cover */
.rec-card-v2__accent-line {
  height: 3px;
  background: var(--p-brand-400);
}
.rec-card-v2--live .rec-card-v2__accent-line   { background: var(--p-live-500); }
.rec-card-v2--soon .rec-card-v2__accent-line   { background: var(--p-soon-500); }
.rec-card-v2--ended .rec-card-v2__accent-line  { background: var(--p-ended-500); }
.rec-card-v2--open .rec-card-v2__accent-line   { background: var(--p-brand-400); }

/* body — 紧凑信息区,无 footer / 无报名按钮(整卡 clickable) */
.rec-card-v2__body {
  padding: var(--p-space-4) var(--p-space-4) var(--p-space-5);
}
.rec-card-v2__title {
  font-size: var(--p-text-md); font-weight: 700;
  color: var(--p-text);
  line-height: var(--p-leading-tight);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin: 0 0 var(--p-space-2);
  letter-spacing: -0.01em;
}
.rec-card-v2:first-child .rec-card-v2__title {
  font-size: var(--p-text-lg);
}
.rec-card-v2__meta {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0;
}
.rec-card-v2__meta-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--p-text-soft);
  font-weight: 500;
}
.rec-card-v2__meta-row svg { flex-shrink: 0; color: var(--p-text-muted); }

/* status badge v2 — semantic colour system */
.badge-v2 {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-v2--live {
  background: var(--p-live-50); color: var(--p-live-500);
}
.badge-v2--live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: live-pulse 1.2s ease-in-out infinite;
}
.badge-v2--soon {
  background: var(--p-soon-50); color: var(--p-soon-500);
}
.badge-v2--open {
  background: var(--p-brand-50); color: var(--p-brand-600);
}
.badge-v2--ended {
  background: var(--p-ended-50); color: var(--p-ended-500);
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* skeleton v2 for rec cards */
.rec-skel-v2 {
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border-soft);
}
.rec-skel-v2__cover { aspect-ratio: 16/9; }
.rec-skel-v2__body { padding: var(--p-space-4); }
.rec-skel-v2__line { border-radius: var(--p-radius-sm); margin-bottom: 8px; }

/* ================================================================
   HOME v2 LOCALE SWITCHER
   ================================================================ */
.locale-pill {
  display: flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 10px;
  background: var(--p-glass-bg);
  border: 1px solid var(--p-glass-border);
  border-radius: var(--p-radius-full);
  color: rgba(255,255,255,0.9);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background var(--p-dur-quick) var(--p-ease-out);
  position: relative;
  /* z-index 200 — dropdown 浮在熊猫和 hero 内容之上,确保鼠标可点 */
  z-index: 200;
}
.locale-pill:hover { background: rgba(255,255,255,0.18); }
.locale-pill:focus-visible { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 2px; }

.locale-pill--light {
  background: var(--p-bg-tinted);
  border-color: var(--p-border);
  color: var(--p-text-soft);
}
.locale-pill--light:hover { background: var(--p-border-soft); }

.locale-pill__dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-md);
  box-shadow: var(--p-shadow-lg);
  min-width: 140px;
  z-index: var(--p-z-overlay);
  overflow: hidden;
  display: none;
}
.locale-pill__dropdown.open { display: block; }
.locale-pill__option {
  display: block; width: 100%;
  padding: 10px var(--p-space-4);
  font-size: var(--p-text-sm); color: var(--p-text);
  text-align: left; cursor: pointer;
  transition: background var(--p-dur-quick) var(--p-ease-out);
  border: 0; background: none;
}
.locale-pill__option:hover { background: var(--p-bg-tinted); }
.locale-pill__option.current { color: var(--p-brand-500); font-weight: 600; }

/* ================================================================
   HOME v2 — SECTION HEADERS  (rhythm improvement)
   ================================================================ */
.section-v2 { margin-top: var(--p-space-8); }
.section-v2__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--p-space-4);
  padding: 0;
}
.section-v2__title {
  font-size: var(--p-text-xl); font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--p-text);
  line-height: 1;
}
.section-v2__more {
  font-size: var(--p-text-sm); font-weight: 600;
  color: var(--p-brand-500);
  display: flex; align-items: center; gap: 3px;
  transition: gap var(--p-dur-quick) var(--p-ease-out);
}
.section-v2__more:hover { gap: 6px; }

/* ================================================================
   HOME v2 — DESKTOP LAYOUT (≥1024px two-column)
   ================================================================ */
@media (min-width: 1024px) {
  .home-v2-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: var(--p-content-max);
    margin: 0 auto;
    padding: 0 var(--p-space-7) var(--p-space-9);
  }
}

/* ================================================================
   HOME v2 — TOPNAV AVATAR
   ================================================================ */
.topnav-avatar-v2 {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--p-grad-hero);
  color: var(--p-text-on-brand);
  font-size: var(--p-text-xs); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--p-brand-100);
  cursor: pointer;
  transition: box-shadow var(--p-dur-quick) var(--p-ease-out);
}
.topnav-avatar-v2:hover { box-shadow: 0 0 0 3px var(--p-brand-200); }
.topnav-avatar-v2 img { width: 100%; height: 100%; object-fit: cover; }

/* ================================================================
   HOME v2 — EMPTY STATE (improved)
   ================================================================ */
.empty-v2 {
  text-align: center;
  padding: var(--p-space-8) var(--p-space-4);
  color: var(--p-text-muted);
}
.empty-v2__panda { display: inline-block; margin-bottom: var(--p-space-3); }
.empty-v2__title {
  font-size: var(--p-text-md); font-weight: 700;
  color: var(--p-text-soft);
  margin: 0 0 var(--p-space-1);
}
.empty-v2__desc {
  font-size: var(--p-text-sm); margin: 0 0 var(--p-space-5);
  line-height: var(--p-leading-relaxed);
}

/* ================================================================
   HOME v2 — SEARCH BAR lifted card
   ================================================================ */
.home-v2-search-card {
  background: var(--p-bg-elevated);
  border-radius: var(--p-radius-xl);
  box-shadow: var(--p-shadow-lg), 0 0 0 1px var(--p-border-soft);
  overflow: hidden;
}
.home-v2-search-card .search__input {
  box-shadow: none;
  border-radius: var(--p-radius-xl);
  background: transparent;
  height: 48px;
  font-size: var(--p-text-md);
}
.home-v2-search-card .search__input:focus {
  box-shadow: none;
  border-bottom: 2px solid var(--p-brand-400);
  border-radius: 0;
}

/* ================================================================
   HOME v2 — PAGE WRAPPER + SECTIONS PADDING
   ================================================================ */
.home-v2-sections {
  padding: 0 var(--p-space-5) var(--p-space-9);
}
@media (min-width: 768px) {
  .home-v2-sections { padding: 0 var(--p-space-7) var(--p-space-9); }
}

/* star decorative elements in hero (no image deps) */
.hero-v2__stars {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.hero-v2__star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: star-twinkle 3s ease-in-out infinite alternate;
}
@keyframes star-twinkle {
  from { opacity: 0.15; transform: scale(1); }
  to   { opacity: 0.55; transform: scale(1.3); }
}

/* =====================================================================
   MEETINGS PAGE — Pro-max redesign (v2) utilities
   Only adds; never overrides tokens or earlier styles.
   ===================================================================== */

/* Chip filter: enhanced active pill with shadow/glow feedback */
.chip--filter {
  position: relative;
  height: 34px; padding: 0 16px;
  background: var(--p-bg-tinted);
  color: var(--p-text-soft);
  border-radius: var(--p-radius-full);
  border: 1.5px solid transparent;
  font-size: var(--p-text-sm); font-weight: 500;
  white-space: nowrap;
  transition: all var(--p-dur-quick) var(--p-ease-out);
  cursor: pointer; user-select: none;
}
.chip--filter:hover { background: var(--p-border-soft); color: var(--p-text); }
.chip--filter.active {
  background: var(--p-brand-500); color: #fff;
  border-color: var(--p-brand-500);
  box-shadow: 0 2px 12px rgba(124,58,237,0.30);
}
.chip--filter.chip--live-active {
  background: #EF4444 !important; color: #fff !important;
  border-color: #EF4444 !important;
  animation: chip-live-glow-m 2s ease-in-out infinite;
}
@keyframes chip-live-glow-m {
  0%,100% { box-shadow: 0 2px 10px rgba(239,68,68,0.30); }
  50%      { box-shadow: 0 2px 18px rgba(239,68,68,0.55), 0 0 0 4px rgba(239,68,68,0.12); }
}

/* LIVE card: red border hero treatment */
.mc--live {
  border: 2px solid #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.10), var(--p-shadow-md) !important;
}
.mc--live:hover {
  box-shadow: 0 0 0 3px rgba(239,68,68,0.18), var(--p-shadow-lg) !important;
  transform: translateY(-4px) !important;
}

/* LIVE badge pill on cover */
.badge-live-pill {
  position: absolute; top: var(--p-space-3); left: var(--p-space-3);
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px;
  background: #EF4444; color: #fff;
  border-radius: var(--p-radius-full);
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(239,68,68,0.5);
}
.badge-live-pill .live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff;
  animation: live-blink-m 1.2s ease-in-out infinite;
}
@keyframes live-blink-m {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.35; transform: scale(0.75); }
}

/* Status pill on cover (non-live) */
.badge-cover-pill {
  position: absolute; bottom: var(--p-space-3); left: var(--p-space-3);
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px;
  border-radius: var(--p-radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
.badge-cover-pill--published { background: rgba(255,255,255,0.92); color: var(--p-brand-600); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.badge-cover-pill--ended     { background: rgba(15,23,42,0.60); color: rgba(255,255,255,0.85); backdrop-filter: blur(4px); }

/* Countdown badge (upcoming: <14 days) */
.badge-countdown {
  position: absolute; bottom: var(--p-space-3); right: var(--p-space-3);
  height: 22px; padding: 0 9px;
  border-radius: var(--p-radius-full);
  font-size: 10px; font-weight: 700;
  background: rgba(124,58,237,0.85); color: #fff;
  backdrop-filter: blur(4px);
  display: inline-flex; align-items: center;
}

/* Gradient overlay on cover (text contrast) */
.mc-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(15,23,42,0.48) 100%);
  pointer-events: none;
}

/* Ended card dim */
.mc--ended { opacity: 0.7; }
.mc--ended:hover { opacity: 1; }

/* ---- Meetings page: enhanced empty state ---- */
.meetings-empty-card {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--p-space-4);
  padding: var(--p-space-9) var(--p-space-6);
  text-align: center;
}
.meetings-empty-card__icon {
  width: 72px; height: 72px;
  border-radius: var(--p-radius-xl);
  background: var(--p-brand-50); color: var(--p-brand-400);
  display: flex; align-items: center; justify-content: center;
}
.meetings-empty-card__title {
  font-size: var(--p-text-lg); font-weight: 700;
  color: var(--p-text); margin: 0;
}
.meetings-empty-card__desc {
  font-size: var(--p-text-sm); color: var(--p-text-muted);
  margin: 0; max-width: 240px;
  line-height: var(--p-leading-relaxed);
}

/* =====================================================================
   ORDERS PAGE — Pro-max redesign (v2) utilities
   ===================================================================== */

/* Order card: strip-top vertical layout */
.ocard {
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius-lg);
  overflow: hidden; box-shadow: var(--p-shadow-xs);
  cursor: pointer;
  transition: transform var(--p-dur-base) var(--p-ease-out),
              box-shadow var(--p-dur-base) var(--p-ease-out);
}
.ocard:hover  { transform: translateY(-2px); box-shadow: var(--p-shadow-md); }
.ocard:active { transform: translateY(0) scale(0.99); }
.ocard:focus-visible { outline: 2px solid var(--p-brand-400); outline-offset: 2px; }

/* colour strip on top */
.ocard__strip { height: 5px; }
.ocard__strip--paying  { background: linear-gradient(90deg,#3B82F6,#06B6D4); }
.ocard__strip--review  { background: linear-gradient(90deg,#F59E0B,#FDE68A); }
.ocard__strip--joining { background: var(--p-grad-hero); }
.ocard__strip--done    { background: linear-gradient(90deg,#10B981,#6EE7B7); }
.ocard__strip--neutral { background: var(--p-border-soft); }

.ocard__body { padding: var(--p-space-4); }

/* head row: thumb + meta + badge */
.ocard__head {
  display: flex; gap: var(--p-space-3); align-items: flex-start;
  margin-bottom: var(--p-space-3);
}
.ocard__thumb {
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: var(--p-radius-md);
  background: var(--p-grad-hero); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.70);
}
.ocard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ocard__meta { flex: 1; min-width: 0; }
.ocard__title {
  font-size: var(--p-text-md); font-weight: 600;
  line-height: 1.3; margin: 0 0 5px; color: var(--p-text);
}
.ocard__submeta {
  font-size: var(--p-text-xs); color: var(--p-text-muted);
  display: flex; flex-wrap: wrap; gap: 3px 8px;
}
.ocard__submeta-item { display: inline-flex; align-items: center; gap: 3px; }

/* amount + badge row */
.ocard__row2 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--p-space-3);
}
.ocard__amount {
  font-size: var(--p-text-xl); font-weight: 800; color: var(--p-text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.ocard__amount-currency {
  font-size: var(--p-text-sm); font-weight: 500;
  color: var(--p-text-muted); margin-right: 2px;
}

/* badges — heavier than default */
.obadge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: var(--p-radius-sm);
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
}
.obadge--paying  { background: #DBEAFE; color: #1D4ED8; }
.obadge--review  { background: #FEF3C7; color: #92400E; }
.obadge--joining { background: var(--p-brand-50); color: var(--p-brand-700); }
.obadge--done    { background: #D1FAE5; color: #065F46; }
.obadge--neutral { background: var(--p-bg-tinted); color: var(--p-text-soft); }
.obadge .obadge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* action row */
.ocard__actions { display: flex; gap: var(--p-space-2); flex-wrap: wrap; }
.ocard__actions .btn--primary  { flex: 1; min-height: 38px; font-size: var(--p-text-sm); }
.ocard__actions .btn--ghost    { min-height: 38px; font-size: var(--p-text-sm); }
.ocard__btn-danger-ghost {
  min-height: 38px; font-size: var(--p-text-sm);
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--p-space-2); padding: 0 var(--p-space-3);
  border-radius: var(--p-radius-md);
  color: var(--p-danger-500); background: transparent;
  transition: background var(--p-dur-quick) var(--p-ease-out);
  cursor: pointer;
}
.ocard__btn-danger-ghost:hover { background: var(--p-danger-50); }

/* ---- detail sheet: bank-ledger style ---- */
.ds-amount-block {
  text-align: center;
  padding: var(--p-space-6) 0 var(--p-space-4);
}
.ds-amount-label {
  font-size: 11px; color: var(--p-text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--p-space-1);
}
.ds-amount-val {
  font-size: 38px; font-weight: 800; color: var(--p-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em; line-height: 1;
}
.ds-amount-val .ds-currency {
  font-size: var(--p-text-lg); font-weight: 500;
  color: var(--p-text-muted); vertical-align: super;
  margin-right: 2px; letter-spacing: 0;
}

/* status timeline bar */
.ds-timeline {
  display: flex; align-items: flex-start;
  padding: var(--p-space-3) 0 var(--p-space-4);
}
.ds-tl-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; flex: 1;
  font-size: 10px; font-weight: 600;
  color: var(--p-text-muted);
  text-align: center;
}
.ds-tl-step.done   { color: var(--p-success-500); }
.ds-tl-step.active { color: var(--p-brand-500); }
.ds-tl-step.active .ds-tl-dot {
  background: var(--p-brand-500);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.18);
  transform: scale(1.25);
}
.ds-tl-step.done .ds-tl-dot { background: var(--p-success-500); }
.ds-tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--p-border-strong);
  transition: all var(--p-dur-base) var(--p-ease-out);
}
.ds-tl-label { line-height: 1.2; }
.ds-tl-connector {
  flex: 1; height: 2px; background: var(--p-border-soft);
  margin-top: 4px; /* align with dot row */
  align-self: flex-start; margin-top: 13px;
}
.ds-tl-connector.done { background: var(--p-success-500); }

/* info section groups */
.ds-section {
  border-radius: var(--p-radius-md);
  background: var(--p-bg-tinted);
  overflow: hidden; margin-bottom: var(--p-space-4);
}
.ds-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px var(--p-space-4);
  border-bottom: 1px solid var(--p-border-soft);
  gap: var(--p-space-3); font-size: var(--p-text-sm);
}
.ds-row:last-child { border-bottom: 0; }
.ds-row__label { color: var(--p-text-muted); flex-shrink: 0; font-weight: 500; }
.ds-row__val   { color: var(--p-text); font-weight: 500; text-align: right; word-break: break-all; }
/* 区块小标题(报名信息 / 入住人 等) */
.ds-section-title {
  font-size: var(--p-text-sm); font-weight: 600; color: var(--p-text-muted);
  margin: 0 0 var(--p-space-2); padding-left: 2px;
}
/* 长文本字段:label 在上、value 在下,左对齐换行(地址 / 备注 / 文件等) */
.ds-row--stack { flex-direction: column; align-items: stretch; gap: 4px; }
.ds-row--stack .ds-row__label { text-align: left; }
.ds-row__val--free { text-align: left; white-space: pre-wrap; word-break: break-word; font-weight: 600; }
.ds-file-link { color: var(--p-brand-500); text-decoration: underline; }
.ds-row--id .ds-row__val {
  display: flex; align-items: center; gap: var(--p-space-2);
  font-family: var(--p-font-mono); font-size: 12px;
}
.ds-copy-btn {
  width: 30px; height: 30px; border-radius: var(--p-radius-sm);
  color: var(--p-text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--p-dur-quick) var(--p-ease-out);
}
.ds-copy-btn:hover { background: var(--p-border-soft); color: var(--p-brand-500); }

/* sheet footer */
.ds-footer {
  display: flex; gap: var(--p-space-3); margin-top: var(--p-space-5);
}
.ds-footer .btn { flex: 1; }
.btn--danger-outline {
  background: transparent;
  border: 1.5px solid var(--p-danger-500);
  color: var(--p-danger-500); min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--p-space-2); padding: 0 var(--p-space-5);
  border-radius: var(--p-radius-md); font-size: var(--p-text-md); font-weight: 600;
  transition: all var(--p-dur-quick) var(--p-ease-out); cursor: pointer;
}
.btn--danger-outline:hover { background: var(--p-danger-50); }

/* ---- cancel sheet: styled (not system dialog) ---- */
.cancel-icon-wrap {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--p-danger-50); color: var(--p-danger-500);
  display: flex; align-items: center; justify-content: center;
  margin: var(--p-space-5) auto var(--p-space-3);
}
.cancel-sheet-title {
  font-size: var(--p-text-xl); font-weight: 700;
  color: var(--p-text); text-align: center; margin: 0 0 var(--p-space-2);
}
.cancel-sheet-desc {
  font-size: var(--p-text-sm); color: var(--p-text-muted);
  text-align: center; margin: 0 0 var(--p-space-5);
  padding: 0 var(--p-space-4);
  line-height: var(--p-leading-relaxed);
}
.cancel-sheet-actions {
  display: flex; gap: var(--p-space-3);
}
.cancel-sheet-actions .btn { flex: 1; min-height: 48px; }

/* ---- orders empty states (bucket-specific) ---- */
.orders-empty-v2 {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--p-space-3);
  padding: var(--p-space-8) var(--p-space-5) var(--p-space-9);
  text-align: center;
}
.orders-empty-v2__bubble {
  width: 72px; height: 72px; border-radius: var(--p-radius-xl);
  display: flex; align-items: center; justify-content: center;
  background: var(--p-bg-tinted);
  color: var(--p-text-muted);
}
.orders-empty-v2__title {
  font-size: var(--p-text-lg); font-weight: 700;
  color: var(--p-text); margin: 0;
}
.orders-empty-v2__desc {
  font-size: var(--p-text-sm); color: var(--p-text-muted);
  margin: 0; max-width: 220px;
  line-height: var(--p-leading-relaxed);
}

/* cover in detail sheet */
.ds-cover {
  width: 100%; height: 130px;
  border-radius: var(--p-radius-lg); overflow: hidden;
  background: var(--p-grad-hero); margin-bottom: var(--p-space-4);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75);
  font-size: 40px; flex-shrink: 0;
}
.ds-cover img { width: 100%; height: 100%; object-fit: cover; }

/* order card skeleton improved */
.ocard-skel {
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius-lg);
  overflow: hidden; box-shadow: var(--p-shadow-xs);
}
.ocard-skel__strip { height: 5px; }
.ocard-skel__body  { padding: var(--p-space-4); display: flex; flex-direction: column; gap: var(--p-space-3); }
.ocard-skel__top   { display: flex; gap: var(--p-space-3); }
.ocard-skel__thumb { width: 54px; height: 54px; border-radius: var(--p-radius-md); flex-shrink: 0; }
.ocard-skel__lines { flex: 1; display: flex; flex-direction: column; gap: var(--p-space-2); justify-content: center; }

/* ============ payment sheet ============ */
.payment-sheet .pp-providers {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--p-space-4);
}
.pp-prov-chip {
  padding: 8px 14px;
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius-full);
  background: var(--p-bg-elevated);
  color: var(--p-text);
  font-size: var(--p-text-sm);
  cursor: pointer;
  transition: background var(--p-dur-quick), border-color var(--p-dur-quick), color var(--p-dur-quick);
}
.pp-prov-chip:hover { border-color: var(--p-brand-400); }
.pp-prov-chip.active {
  background: var(--p-brand-500); color: #fff; border-color: var(--p-brand-500);
}
.pp-area {
  min-height: 280px;
  display: flex; align-items: center; justify-content: center;
  padding: var(--p-space-3) 0;
}
.pp-loading, .pp-empty {
  color: var(--p-text-soft);
  font-size: var(--p-text-sm);
  text-align: center;
  padding: var(--p-space-6) var(--p-space-4);
}
.pp-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--p-border-soft);
  border-top-color: var(--p-brand-500);
  border-radius: 50%;
  animation: pp-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes pp-spin { to { transform: rotate(360deg); } }
.pp-qr {
  display: flex; flex-direction: column; align-items: center; gap: var(--p-space-3);
}
.pp-qr img {
  border-radius: var(--p-radius-md);
  background: #fff;
  padding: var(--p-space-2);
  border: 1px solid var(--p-border-soft);
}
.pp-qr-hint {
  font-size: var(--p-text-sm); color: var(--p-text-soft); text-align: center;
}
.pp-stripe-form { width: 100%; max-width: 420px; }
.pp-stripe-submit { width: 100%; margin-top: var(--p-space-4); }
.pp-stripe-error {
  margin-top: var(--p-space-2);
  color: var(--p-danger-500);
  font-size: var(--p-text-sm);
}
#pp-paypal-buttons { width: 100%; max-width: 420px; }

/* ============ bank transfer (manual_transfer) ============ */
.bt-instructions {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--p-space-4);
  text-align: left;
}
.bt-instructions__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--p-space-3);
  flex-wrap: wrap;
}
.bt-instructions__title {
  margin: 0;
  font-size: var(--p-text-md);
  font-weight: 600;
  color: var(--p-text);
}
.bt-instructions__hint {
  margin: 0;
  font-size: var(--p-text-sm);
  color: var(--p-text-soft);
  line-height: 1.55;
  background: var(--p-bg-tinted);
  border-radius: var(--p-radius-md);
  padding: var(--p-space-3) var(--p-space-4);
}
.bt-countdown {
  margin: 0;
  font-size: var(--p-text-xs);
  color: var(--p-text-muted);
  font-weight: 500;
}
.bt-countdown--expired { color: var(--p-danger-500); }

/* account card */
.bt-account-card {
  background: var(--p-bg-elevated);
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius-lg);
  padding: var(--p-space-3) var(--p-space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bt-account-card__head {
  font-size: var(--p-text-xs);
  font-weight: 600;
  color: var(--p-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--p-space-2) 0;
  border-bottom: 1px solid var(--p-border-soft);
  margin-bottom: var(--p-space-2);
}
.bt-row {
  display: grid;
  grid-template-columns: 84px 1fr 32px;
  align-items: center;
  gap: var(--p-space-3);
  padding: 10px 0;
  border-bottom: 1px dashed var(--p-border-soft);
}
.bt-row:last-of-type { border-bottom: 0; }
.bt-row__label {
  font-size: var(--p-text-xs);
  color: var(--p-text-muted);
  white-space: nowrap;
}
.bt-row__value {
  font-size: var(--p-text-sm);
  color: var(--p-text);
  word-break: break-all;
  font-weight: 500;
  min-width: 0;
}
.bt-row__value--mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

/* copy button */
.bt-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--p-radius-sm);
  color: var(--p-text-muted);
  background: transparent;
  transition: background var(--p-dur-quick) var(--p-ease-out), color var(--p-dur-quick) var(--p-ease-out);
}
.bt-copy:hover { background: var(--p-bg-tinted); color: var(--p-brand-500); }
.bt-copy:active { transform: scale(0.94); }
.bt-copy--inline { width: 32px; height: 32px; flex-shrink: 0; }

/* memo block — 高亮汇款金额与备注码 */
.bt-memo {
  background: linear-gradient(135deg, #FFF8E6, #FEF3C7);
  border: 1px solid #FCD34D;
  border-radius: var(--p-radius-lg);
  padding: var(--p-space-3) var(--p-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--p-space-2);
}
.bt-memo__row {
  display: grid;
  grid-template-columns: 84px 1fr 32px;
  align-items: center;
  gap: var(--p-space-3);
}
.bt-memo__label {
  font-size: var(--p-text-xs);
  color: #92400E;
  font-weight: 600;
  white-space: nowrap;
}
.bt-memo__amount {
  font-size: var(--p-text-lg);
  font-weight: 700;
  color: #B45309;
  letter-spacing: 0.01em;
  min-width: 0;
  word-break: break-all;
}
.bt-memo__code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--p-text-sm);
  font-weight: 600;
  color: #78350F;
  word-break: break-all;
  min-width: 0;
}

/* upload card */
.bt-upload-zone { width: 100%; }
.bt-upload-card {
  border: 2px dashed var(--p-border-strong);
  border-radius: var(--p-radius-lg);
  padding: var(--p-space-5) var(--p-space-4);
  text-align: center;
  background: var(--p-bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--p-space-3);
}
.bt-upload-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--p-space-5);
}
.bt-upload-hint {
  margin: 0;
  font-size: var(--p-text-xs);
  color: var(--p-text-muted);
}
.bt-upload-preview {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--p-space-2);
  margin-top: var(--p-space-2);
}
.bt-upload-preview__img {
  max-width: 240px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: var(--p-radius-md);
  border: 1px solid var(--p-border-soft);
  object-fit: contain;
}
.bt-upload-preview__file {
  font-size: var(--p-text-sm);
  color: var(--p-text-soft);
  background: var(--p-bg-tinted);
  border-radius: var(--p-radius-md);
  padding: var(--p-space-2) var(--p-space-3);
  word-break: break-all;
  max-width: 100%;
}
.bt-upload-preview__progress {
  font-size: var(--p-text-xs);
  color: var(--p-text-muted);
}

/* voucher status bar */
.bt-status-bar {
  display: flex;
  align-items: center;
  gap: var(--p-space-2);
  padding: var(--p-space-3) var(--p-space-4);
  border-radius: var(--p-radius-md);
  font-size: var(--p-text-sm);
  font-weight: 500;
  margin-bottom: var(--p-space-3);
}
.bt-status-bar svg { flex-shrink: 0; }
.bt-status-bar--review {
  background: var(--p-info-50);
  color: var(--p-info-500);
  border: 1px solid var(--p-info-500);
}
.bt-status-bar--approved {
  background: var(--p-success-50);
  color: var(--p-success-500);
  border: 1px solid var(--p-success-500);
}
.bt-status-bar--rejected {
  background: var(--p-danger-50);
  color: var(--p-danger-500);
  border: 1px solid var(--p-danger-500);
}
.bt-voucher-thumb {
  display: block;
  margin-top: var(--p-space-2);
}

/* mobile responsive — < 480 收紧 label 列 */
@media (max-width: 479px) {
  .bt-row, .bt-memo__row {
    grid-template-columns: 72px 1fr 32px;
    gap: var(--p-space-2);
  }
  .bt-memo__amount { font-size: var(--p-text-md); }
}
@media (max-width: 360px) {
  /* 超窄屏:label 与 value 双行 */
  .bt-row, .bt-memo__row {
    grid-template-columns: 1fr 32px;
    grid-template-rows: auto auto;
    gap: 2px var(--p-space-2);
    align-items: start;
  }
  .bt-row__label, .bt-memo__label {
    grid-column: 1 / 2;
    grid-row: 1;
    font-size: 11px;
  }
  .bt-row__value, .bt-memo__amount, .bt-memo__code {
    grid-column: 1 / 2;
    grid-row: 2;
  }
  .bt-row .bt-copy, .bt-memo__row .bt-copy {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: center;
  }
}
