:root {
  --ws-primary: #1cbf73;
  --ws-primary-dark: #17a865;
  --ws-accent: #1cbf73;
  --ws-admin: #f57c00;
  --ws-admin-soft: rgba(245, 124, 0, 0.1);
  --ws-admin-border: rgba(245, 124, 0, 0.42);
  --ws-bg: #f5f6f8;
  --ws-surface: #fff;
  --ws-text: #1a1a1a;
  --ws-muted: #888;
  --ws-border: #e8e8e8;
  --ws-shadow: rgba(0, 0, 0, 0.06);
  --ws-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ws-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ws-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  overflow: hidden;
}

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

.ws-body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #e8ecf1;
  background-image:
    radial-gradient(ellipse 90% 60% at 0% 0%, rgba(28, 191, 115, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(28, 191, 115, 0.1), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.5), transparent 70%),
    linear-gradient(165deg, #e9eef3 0%, #f4f6f9 45%, #e8f5ee 100%);
  color: var(--ws-text);
  -webkit-font-smoothing: antialiased;
  height: 100dvh;
  overflow: hidden;
}

.ws-app {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ws-surface);
  animation: ws-app-in 0.5s var(--ws-ease-out);
  position: relative;
  z-index: 1;
}

@keyframes ws-app-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ws-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ws-view-enter {
  animation: ws-view-in 0.32s var(--ws-ease-out);
}

@keyframes ws-view-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (hover: hover) and (pointer: fine) {
  .ws-view-enter {
    animation: ws-view-in-desktop 0.38s var(--ws-ease-out);
  }

  @keyframes ws-view-in-desktop {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.ws-main-leave {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ws-animate-item {
  animation: ws-item-in 0.42s var(--ws-ease-out) backwards;
  animation-delay: calc(var(--ws-i, 0) * 42ms);
}

@keyframes ws-item-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ws-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.98) 100%);
  border-bottom: 1px solid var(--ws-border);
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  box-shadow: 0 1px 0 rgba(28, 191, 115, 0.08);
}

.ws-header-title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  transition: opacity 0.25s ease, transform 0.25s var(--ws-ease-out);
}

.ws-header-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--ws-primary), transparent);
  opacity: 0.85;
}

.ws-header-title.ws-title-change {
  animation: ws-title-pop 0.35s var(--ws-ease-out);
}

@keyframes ws-title-pop {
  0% { opacity: 0.5; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

.ws-hero {
  position: relative;
  flex-shrink: 0;
}

.ws-hero-banner {
  position: relative;
  height: calc(148px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  background: linear-gradient(160deg, #3d4451 0%, #2c313c 48%, #1f2329 100%);
}

.ws-hero-banner-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.42) 100%);
  pointer-events: none;
}

.ws-hero-banner-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  width: max-content;
  animation: ws-banner-scroll 50s linear infinite;
  will-change: transform;
}

body.ws-shelf-decor-paused .ws-hero-banner-track,
body.ws-shelf-decor-paused .ws-ambient-left,
body.ws-shelf-decor-paused .ws-ambient-right {
  animation-play-state: paused !important;
}

@keyframes ws-banner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ws-hero-slide {
  width: 84px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transform: rotate(-3deg);
}

.ws-hero-slide:nth-child(even) {
  transform: rotate(3deg);
}

.ws-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-hero-slide-fallback {
  background: linear-gradient(145deg, #5a6270 0%, #3d4451 100%);
}

.ws-header-hero {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: transparent;
  border-bottom: none;
  padding: 10px 14px 14px;
  box-shadow: none;
}

.ws-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 36px;
}

.ws-header-hero .ws-header-title {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  padding-right: 72px;
}

.ws-header-hero .ws-header-title::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.ws-home-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ws-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ws-home-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ws-home-btn:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%) scale(1.02);
}

.ws-home-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.ws-sync-hint {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 120;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(31, 35, 41, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s var(--ws-ease-out);
}

.ws-sync-hint.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ws-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(76px + var(--ws-safe-bottom));
}

.ws-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ws-muted);
  font-size: 14px;
}

.ws-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--ws-border);
  border-top-color: var(--ws-primary);
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
}

.ws-loading p {
  animation: ws-pulse 1.4s ease-in-out infinite;
}

@keyframes ws-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes ws-spin { to { transform: rotate(360deg); } }

.ws-stats-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 8px 16px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: transparent;
  flex-shrink: 0;
}

.ws-stats-bar::-webkit-scrollbar {
  display: none;
}

.ws-stat-item {
  flex: 1 1 0;
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  padding: 7px 4px 6px;
  background: var(--ws-surface);
  border: 1px solid rgba(28, 191, 115, 0.12);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.2s var(--ws-ease-spring), box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ws-stat-item:hover {
  border-color: rgba(28, 191, 115, 0.28);
  box-shadow: 0 3px 10px rgba(28, 191, 115, 0.08);
}

.ws-stat-item.is-active {
  border-color: var(--ws-primary);
  background: linear-gradient(180deg, rgba(28, 191, 115, 0.13) 0%, #fff 100%);
  box-shadow: 0 3px 12px rgba(28, 191, 115, 0.15);
}

.ws-stat-num {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ws-primary);
  line-height: 1.1;
  transition: transform 0.25s var(--ws-ease-spring);
}

.ws-stat-item.is-active .ws-stat-num {
  color: var(--ws-primary);
}

.ws-stat-item.is-active .ws-stat-label {
  color: var(--ws-text);
  font-weight: 600;
}

.ws-stat-item:hover .ws-stat-num {
  transform: scale(1.04);
}

.ws-stat-label {
  font-size: 10px;
  color: var(--ws-muted);
  white-space: nowrap;
  line-height: 1.2;
}

.ws-filters {
  display: none;
}

.ws-filters::-webkit-scrollbar {
  display: none;
}

.ws-filter {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--ws-border);
  border-radius: 20px;
  background: var(--ws-surface);
  color: var(--ws-muted);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.2s var(--ws-ease-spring), box-shadow 0.25s ease;
}

.ws-filter:active {
  transform: scale(0.94);
}

.ws-filter.active {
  background: var(--ws-primary);
  color: #fff;
  border-color: var(--ws-primary);
  box-shadow: 0 4px 12px rgba(28, 191, 115, 0.35);
}

.ws-scope-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.ws-scope-bar::-webkit-scrollbar {
  display: none;
}

.ws-scope-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--ws-border);
  border-radius: 20px;
  background: var(--ws-surface);
  color: var(--ws-muted);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.2s var(--ws-ease-spring), box-shadow 0.25s ease;
}

.ws-scope-btn.active {
  background: var(--ws-primary);
  color: #fff;
  border-color: var(--ws-primary);
  box-shadow: 0 4px 12px rgba(28, 191, 115, 0.35);
}

.ws-panel-note {
  margin: 8px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(28, 191, 115, 0.08);
  border: 1px solid rgba(28, 191, 115, 0.16);
  font-size: 12px;
  color: #167a4c;
  line-height: 1.6;
}

.ws-stats-scope {
  margin: 8px 16px 0;
  font-size: 12px;
  color: var(--ws-muted);
}

.ws-mine-bind-hint {
  margin: 8px 16px 0;
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.6;
}

.ws-center-key-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.6;
}

.ws-key-mismatch {
  display: inline-block;
  margin-left: 6px;
  color: #c45c00;
}

.ws-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  margin-left: 6px;
  vertical-align: middle;
}

.ws-btn-outline {
  background: transparent;
  border: 1px solid var(--ws-accent);
  color: var(--ws-accent);
}

.ws-auth-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
}

.ws-auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: transparent;
  color: var(--ws-muted);
  font-size: 13px;
  cursor: pointer;
}

.ws-auth-tab.active {
  background: var(--ws-accent);
  border-color: var(--ws-accent);
  color: #fff;
}

.ws-required {
  color: #e54545;
  margin-left: 2px;
}

.ws-optional {
  color: var(--ws-muted, #999);
  font-size: 11px;
  font-weight: 400;
  margin-left: 4px;
}

.ws-member-strip {
  display: flex;
  gap: 8px;
  padding: 0 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 4px), #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 4px), #000 100%);
}

.ws-member-strip[hidden] {
  display: none !important;
}

.ws-member-strip::-webkit-scrollbar {
  display: none;
}

.ws-member-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--ws-border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.ws-member-chip.active {
  border-color: var(--ws-primary);
  background: rgba(28, 191, 115, 0.08);
}

.ws-member-avatar,
.ws-member-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.ws-member-avatar {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.ws-status-tag.pending {
  background: #fff7ed;
  color: #ea580c;
}

.ws-status-tag.ok {
  background: #e8f8f0;
  color: #159a5c;
}

.ws-status-tag.reject {
  background: #fef2f2;
  color: #ef4444;
}

.ws-member-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 108px;
}

.ws-member-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ws-member-chip-admin.active {
  border-color: var(--ws-admin-border);
  background: var(--ws-admin-soft);
}

/* 管理员龙珠徽章 */
.ws-db-wrap {
  --db: 20px;
  position: relative;
  display: inline-block;
  width: var(--db);
  height: var(--db);
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 0;
}

.ws-db-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4%;
  transform: translateX(-50%);
  width: 62%;
  height: 11%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(35, 10, 0, 0.32) 0%, rgba(35, 10, 0, 0.08) 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.ws-db-ball {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--db);
  height: var(--db);
}

.ws-db-ball svg {
  display: block;
  width: var(--db);
  height: var(--db);
  overflow: hidden;
  border-radius: 50%;
}

.ws-db-wrap.is-sm { --db: 18px; }
.ws-db-wrap.is-md { --db: 22px; }
.ws-db-wrap.is-lg { --db: 26px; }

@media (prefers-reduced-motion: reduce) {
  .ws-db-ball animate,
  .ws-db-ball animateTransform { display: none; }
}

.ws-empty-hint {
  display: block;
  font-size: 12px;
  margin-top: 8px;
  color: var(--ws-muted);
  line-height: 1.6;
}

.ws-detail-intro {
  padding: 12px 0;
  font-size: 14px;
  color: var(--ws-muted);
  line-height: 1.7;
}

.ws-info-label {
  color: var(--ws-muted);
}

.ws-hero-pref-word {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.9;
}

.ws-mine-login-btn {
  margin-top: 16px;
}

.ws-member-pill-admin {
  background: #f8f9f8;
  box-shadow: 0 0 0 1px rgba(168, 132, 66, 0.14);
}

.ws-grid-wrap,
.ws-stats-page {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0) transparent;
}

.ws-grid-wrap::-webkit-scrollbar,
.ws-stats-page::-webkit-scrollbar {
  width: 6px;
}

.ws-grid-wrap::-webkit-scrollbar-track,
.ws-stats-page::-webkit-scrollbar-track {
  background: transparent;
}

.ws-grid-wrap::-webkit-scrollbar-thumb,
.ws-stats-page::-webkit-scrollbar-thumb {
  background-color: rgba(15, 23, 42, 0);
  border-radius: 999px;
  transition: background-color 0.75s ease-out;
}

.ws-grid-wrap.is-scrolling,
.ws-stats-page.is-scrolling {
  scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}

.ws-grid-wrap.is-scrolling::-webkit-scrollbar-thumb,
.ws-stats-page.is-scrolling::-webkit-scrollbar-thumb {
  background-color: rgba(15, 23, 42, 0.28);
  transition: background-color 0.2s ease;
}

.ws-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.ws-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.ws-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--ws-muted);
  font-size: 14px;
}

.ws-grid-virtual-scroller {
  position: relative;
  min-height: 120px;
}

.ws-grid-virtual-spacer {
  width: 100%;
  pointer-events: none;
}

.ws-grid-virtual-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}

.ws-book {
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  transition: transform 0.28s var(--ws-ease-spring);
}

.ws-book.ws-animate-item {
  animation: ws-book-in 0.34s var(--ws-ease-out) backwards;
  animation-delay: calc(min(var(--ws-i, 0), 8) * 36ms);
}

@keyframes ws-book-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ws-book:active {
  transform: scale(0.94);
}

@media (hover: hover) {
  .ws-book:hover {
    transform: translateY(-3px);
  }
  .ws-book:hover .ws-cover-wrap {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }
  .ws-book:hover .ws-cover {
    transform: scale(1.04);
  }
}

.ws-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #eef2f6, #e2e8f0);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  margin-bottom: 8px;
  transition: box-shadow 0.3s ease, transform 0.3s var(--ws-ease-out);
}

.ws-cover-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    #e8ecf1 8%,
    #f4f7fa 18%,
    #e8ecf1 33%
  );
  background-size: 200% 100%;
  animation: ws-skeleton-shine 1.2s ease-in-out infinite;
  z-index: 1;
  transition: opacity 0.35s ease;
}

.ws-cover-wrap:has(.ws-cover.loaded) .ws-cover-skeleton {
  opacity: 0;
  pointer-events: none;
}

@keyframes ws-skeleton-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.ws-cover.is-error {
  opacity: 0;
}

.ws-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 2;
  transition: transform 0.35s var(--ws-ease-out), opacity 0.35s ease;
}

.ws-cover-articles {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 28px;
}

.ws-badge {
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.ws-badge-top { top: 4px; left: 4px; background: #faad14; color: #fff; }
.ws-badge-done { bottom: 4px; left: 4px; background: var(--ws-primary); color: #fff; }
.ws-badge-album { top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; }
.ws-badge-secret { bottom: 4px; right: 4px; background: rgba(0,0,0,.5); color: #fff; }

.ws-book-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ws-book-author {
  font-size: 11px;
  color: var(--ws-muted);
  margin-top: 2px;
}

.ws-book-time {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}

.ws-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 10px 16px calc(14px + var(--ws-safe-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(232, 236, 241, 0.65) 35%, rgba(232, 236, 241, 0.92) 100%);
  border: none;
  pointer-events: none;
}

.ws-tabbar-inner {
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  box-shadow:
    0 10px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  pointer-events: auto;
}

.ws-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ws-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.ws-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #1cbf73 0%, #17a865 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 0;
  pointer-events: none;
}

.ws-tab::after {
  display: none;
}

.ws-tab.active {
  color: #fff;
  box-shadow: 0 6px 16px rgba(28, 191, 115, 0.38);
}

.ws-tab.active::before {
  opacity: 1;
}

.ws-tab:not(.active):hover {
  color: var(--ws-primary-dark);
  background: rgba(28, 191, 115, 0.08);
}

.ws-tab:active:not(.active) {
  transform: scale(0.96);
}

.ws-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition: transform 0.3s var(--ws-ease-spring);
}

.ws-tab-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ws-tab-label {
  line-height: 1.2;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.ws-tab.active .ws-tab-icon {
  transform: scale(1.05);
}

.ws-stats-page {
  padding: 12px 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  background: var(--ws-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Stats page v2 ── */
.ws-st-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  flex-shrink: 0;
}

.ws-st-seg-btn {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ws-muted);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.18s var(--ws-ease-spring);
}

.ws-st-seg-btn:active {
  transform: scale(0.96);
}

.ws-st-seg-btn.active {
  background: var(--ws-surface);
  color: var(--ws-primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(28, 191, 115, 0.12);
}

.ws-st-hero {
  background: linear-gradient(145deg, #1cbf73 0%, #15a862 55%, #129658 100%);
  border-radius: 16px;
  padding: 16px 18px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(28, 191, 115, 0.28);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  animation: ws-hero-in 0.45s var(--ws-ease-out);
}

.ws-st-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 55%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.ws-st-hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.ws-st-hero-ring {
  --ws-ring: 0%;
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(#fff var(--ws-ring), rgba(255, 255, 255, 0.22) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.6s var(--ws-ease-out);
}

.ws-st-hero-ring-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.ws-st-hero-ring-inner strong {
  font-size: 20px;
  font-weight: 700;
}

.ws-st-hero-ring-inner span {
  font-size: 11px;
  opacity: 0.88;
}

.ws-st-hero-info {
  flex: 1;
  min-width: 0;
}

.ws-st-hero-label {
  font-size: 12px;
  opacity: 0.88;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.ws-st-hero-time {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ws-st-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ws-st-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

.ws-st-meta-pill em {
  font-style: normal;
  opacity: 0.75;
}

.ws-st-meta-pill-soft {
  background: rgba(255, 255, 255, 0.14);
}

.ws-st-compare {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  opacity: 0.92;
  position: relative;
  z-index: 1;
}

.ws-st-panel {
  background: var(--ws-surface);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.ws-st-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.ws-st-panel-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ws-text);
}

.ws-st-panel-sub {
  font-size: 12px;
  color: var(--ws-muted);
}

.ws-st-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ws-st-metric {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--ws-bg);
  border: 1px solid rgba(28, 191, 115, 0.08);
  transition: transform 0.2s var(--ws-ease-spring);
}

@media (hover: hover) {
  .ws-st-metric:hover {
    transform: translateY(-1px);
  }
}

.ws-st-metric-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--ws-primary);
  line-height: 1.2;
}

.ws-st-metric-name {
  font-size: 12px;
  color: var(--ws-muted);
  margin-top: 3px;
}

.ws-st-rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-st-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--ws-bg);
  transition: transform 0.2s var(--ws-ease-spring);
}

@media (hover: hover) {
  .ws-st-rank-item:hover {
    transform: translateX(3px);
  }
}

.ws-st-rank-num {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ws-muted);
}

.ws-st-rank-top .ws-st-rank-num {
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 6px;
  font-size: 12px;
  color: #fff;
}

.ws-st-rank-1 .ws-st-rank-num { background: linear-gradient(135deg, #f5a623, #e8890c); }
.ws-st-rank-2 .ws-st-rank-num { background: linear-gradient(135deg, #b0bec5, #90a4ae); }
.ws-st-rank-3 .ws-st-rank-num { background: linear-gradient(135deg, #cd7f32, #a8642a); }

.ws-st-rank-cover {
  flex-shrink: 0;
  width: 36px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.ws-st-rank-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 191, 115, 0.1);
  font-size: 18px;
}

.ws-st-rank-body {
  flex: 1;
  min-width: 0;
}

.ws-st-rank-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-st-rank-time {
  font-size: 12px;
  color: var(--ws-muted);
  margin-top: 2px;
}

.ws-st-cat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-st-cat-item {
  padding: 0;
}

.ws-st-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.ws-st-cat-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-st-cat-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ws-muted);
}

.ws-st-cat-bar {
  height: 6px;
  background: var(--ws-bg);
  border-radius: 3px;
  overflow: hidden;
}

.ws-st-cat-bar .ws-cat-fill {
  background: linear-gradient(90deg, #1cbf73, #34d399);
  border-radius: 3px;
}

.ws-st-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  background: var(--ws-surface);
  border-radius: 14px;
  border: 1px dashed rgba(28, 191, 115, 0.22);
  min-height: 160px;
}

.ws-st-empty-icon {
  color: var(--ws-primary);
  margin-bottom: 12px;
  opacity: 0.7;
}

.ws-st-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ws-text);
  margin-bottom: 6px;
}

.ws-st-empty-desc {
  font-size: 13px;
  color: var(--ws-muted);
  line-height: 1.55;
  max-width: 260px;
}

/* Legacy stats classes (detail modal etc.) */
.ws-mode-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.ws-mode-btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: var(--ws-surface);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.2s var(--ws-ease-spring), box-shadow 0.25s ease;
}

.ws-mode-btn:active {
  transform: scale(0.96);
}

.ws-mode-btn.active {
  background: var(--ws-primary);
  color: #fff;
  border-color: var(--ws-primary);
  box-shadow: 0 4px 12px rgba(28, 191, 115, 0.3);
}

.ws-st-seg .ws-mode-btn.active {
  background: var(--ws-surface);
  color: var(--ws-primary);
  border-color: transparent;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(28, 191, 115, 0.12);
}

.ws-hero-card {
  background: linear-gradient(135deg, #1cbf73, #17a865);
  border-radius: 16px;
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(28,191,115,.3);
  animation: ws-hero-in 0.55s var(--ws-ease-out);
}

@keyframes ws-hero-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ws-hero-value { font-size: 28px; font-weight: 700; margin: 4px 0 16px; }
.ws-hero-sub { display: flex; gap: 24px; }
.ws-hero-sub span { display: block; font-size: 20px; font-weight: 700; }
.ws-hero-sub small { font-size: 12px; opacity: .85; }

.ws-section { margin-bottom: 16px; }
.ws-section-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.ws-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-stat-card {
  background: var(--ws-surface);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px var(--ws-shadow);
  transition: transform 0.25s var(--ws-ease-spring), box-shadow 0.25s ease;
}

.ws-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--ws-shadow);
}
.ws-stat-card .num { font-size: 22px; font-weight: 700; color: var(--ws-primary); }
.ws-stat-card .name { font-size: 13px; color: var(--ws-muted); margin-top: 4px; }

.ws-rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ws-surface);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px var(--ws-shadow);
  transition: transform 0.25s var(--ws-ease-spring), box-shadow 0.25s ease;
}

.ws-rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 14px var(--ws-shadow);
}
.ws-rank-cover { width: 40px; height: 54px; border-radius: 4px; object-fit: cover; }
.ws-rank-title { font-size: 14px; font-weight: 600; }
.ws-rank-time { font-size: 12px; color: var(--ws-muted); }

.ws-cat-item {
  background: var(--ws-surface);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px var(--ws-shadow);
}
.ws-cat-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.ws-cat-bar { height: 4px; background: var(--ws-bg); border-radius: 2px; overflow: hidden; }
.ws-cat-fill {
  height: 100%;
  background: var(--ws-primary);
  border-radius: 2px;
  width: 0;
  transition: width 0.8s var(--ws-ease-out);
}

.ws-mine-page {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ws-mine-card {
  background: var(--ws-surface);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.ws-mine-card-head h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}
.ws-mine-card-head p,
.ws-mine-form-desc {
  font-size: 13px;
  color: var(--ws-muted);
  line-height: 1.55;
  margin: 0;
}
.ws-mine-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 14px;
  padding: 4px;
  background: #f3f5f4;
  border-radius: 12px;
}
.ws-mine-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ws-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ws-mine-tab.active {
  background: #fff;
  color: var(--ws-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.ws-mine-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ws-mine-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}
.ws-mine-label + .ws-mine-input {
  margin-bottom: 12px;
}
.ws-mine-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ws-mine-input:focus {
  outline: none;
  border-color: var(--ws-primary);
  box-shadow: 0 0 0 3px rgba(28, 191, 115, 0.12);
}
.ws-mine-form .ws-btn-primary {
  margin-top: 4px;
}
.ws-mine-form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.ws-mine-form-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}
.ws-key-guide {
  margin-top: 14px;
  border-top: 1px solid var(--ws-border);
  padding-top: 12px;
}
.ws-key-guide summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--ws-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.ws-key-guide summary::-webkit-details-marker { display: none; }
.ws-key-guide summary::after {
  content: ' ›';
  display: inline-block;
  transition: transform 0.15s ease;
}
.ws-key-guide[open] summary::after {
  transform: rotate(90deg);
}
.ws-key-guide-body {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.ws-key-guide-steps {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.7;
}
.ws-key-guide-steps code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}
.ws-key-guide-qr {
  display: flex;
  justify-content: center;
}
.ws-key-guide-qr img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  border: 1px solid var(--ws-border);
  background: #fff;
}
.ws-key-guide-qr-fallback {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  border: 1px dashed var(--ws-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ws-muted);
}
.ws-key-guide-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--ws-primary);
  text-decoration: none;
}

.ws-skills-login {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.ws-skills-login-qr {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.ws-skills-login-wrap {
  width: 168px;
  height: 168px;
}

.ws-skills-login-refresh {
  border: none;
  background: none;
  color: var(--ws-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.ws-skills-login-refresh:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ws-skills-login-otp {
  width: 100%;
  display: grid;
  gap: 8px;
}

.ws-skills-login-otp .ws-btn {
  width: 100%;
}

.ws-mine-login-btn {
  margin-top: 14px;
  width: auto;
  min-width: 120px;
  padding: 10px 20px;
  font-size: 14px;
}

.ws-skills-login-otp-hint {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--ws-muted);
  line-height: 1.5;
}

.ws-otp-modal {
  display: grid;
  gap: 12px;
}

.ws-otp-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ws-otp-modal-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ws-muted);
  line-height: 1.6;
}

.ws-otp-modal-guide {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(28, 191, 115, 0.08);
  border: 1px solid rgba(28, 191, 115, 0.18);
}

.ws-otp-modal-guide-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ws-text);
}

.ws-otp-modal-steps {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.65;
}

.ws-otp-modal-steps li + li {
  margin-top: 6px;
}

.ws-otp-modal-guide .ws-skills-login-otp-hint {
  margin: 10px 0 0;
}

.ws-otp-modal-guide .ws-skills-login-otp-hint code {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.ws-otp-modal-error {
  margin: 0;
  font-size: 13px;
  color: #ef4444;
}

.ws-otp-modal .ws-btn {
  width: 100%;
}

.ws-qr-timer.is-error {
  color: #ef4444;
}
.ws-profile-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.ws-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eef2f0;
}
.ws-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ws-avatar-bg, #eef2f0);
}
.ws-avatar-wrap.is-fallback {
  background: var(--ws-avatar-bg, #1cbf73);
}
.ws-avatar-wrap.is-fallback::after {
  content: attr(data-initial);
  color: #fff;
  font-weight: 700;
  line-height: 1;
}
.ws-profile-avatar.ws-avatar-wrap.is-fallback::after {
  font-size: 20px;
}
.ws-member-chip .ws-avatar-wrap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.ws-member-chip .ws-avatar-wrap.is-fallback::after {
  font-size: 11px;
}
.ws-member-pill .ws-avatar-wrap {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.ws-member-pill .ws-avatar-wrap.is-fallback::after {
  font-size: 12px;
}
.ws-profile-avatar-img,
.ws-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ws-avatar-wrap .ws-member-chip-avatar,
.ws-avatar-wrap .ws-member-pill-avatar,
.ws-avatar-wrap .ws-profile-avatar-img,
.ws-avatar-wrap .ws-avatar-img {
  width: 100%;
  height: 100%;
}
.ws-profile-info {
  flex: 1;
  min-width: 0;
}
.ws-profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.ws-profile-name-row h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.ws-profile-key {
  font-size: 12px;
  color: var(--ws-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin: 0;
  word-break: break-all;
}
.ws-profile-logout {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--ws-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.ws-profile-logout:hover {
  color: #e54545;
}
.ws-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(28, 191, 115, 0.06);
}
.ws-profile-stats > div {
  text-align: center;
}
.ws-profile-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--ws-primary);
  line-height: 1.2;
}
.ws-profile-stats span {
  font-size: 11px;
  color: var(--ws-muted);
}
.ws-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ws-btn-link {
  display: block;
  width: 100%;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--ws-muted);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.ws-btn-link:hover {
  color: var(--ws-primary);
}
.ws-profile-footnote {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ws-muted);
  text-align: center;
  line-height: 1.5;
}
.ws-mine-status-desc {
  font-size: 13px;
  color: var(--ws-muted);
  margin: 0;
  line-height: 1.5;
}
.ws-mine-status-tip {
  font-size: 13px;
  color: var(--ws-muted);
  line-height: 1.6;
  margin: 0;
  padding-top: 4px;
}
.ws-mine-members h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}
.ws-mine-members h4 small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ws-muted);
  margin-left: 6px;
}
.ws-member-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ws-member-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  font-size: 13px;
  background: #f3f5f4;
  color: var(--ws-text);
}
.ws-member-pill-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.ws-mine-members-empty {
  font-size: 13px;
  color: var(--ws-muted);
  margin: 0;
}

.ws-auth-page { padding: 24px 20px; flex: 1; overflow-y: auto; min-height: 0; }
.ws-center-desc {
  font-size: 13px;
  color: var(--ws-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.ws-center-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 6px;
}
.ws-center-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}
.ws-center-step {
  background: #f8faf9;
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.ws-center-step-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f8f0;
  color: #159a5c;
  font-size: 13px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.ws-center-step strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.ws-center-step span {
  display: block;
  font-size: 11px;
  color: var(--ws-muted);
  line-height: 1.4;
}
.ws-skills-qr {
  margin-bottom: 14px;
}
.ws-skills-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: ws-skills-step;
}
.ws-skills-steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(28, 191, 115, 0.06);
  border: 1px solid rgba(28, 191, 115, 0.12);
  counter-increment: ws-skills-step;
}
.ws-skills-steps li::before {
  content: counter(ws-skills-step);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ws-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ws-skills-step-body {
  flex: 1;
  min-width: 0;
}
.ws-skills-steps strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
  color: var(--ws-text);
}
.ws-skills-steps .ws-skills-step-body > span {
  display: block;
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.45;
}
.ws-skills-steps code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}
.ws-key-save-tip {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
}
.ws-key-save-tip-inline {
  margin: 8px 0 0;
}
.ws-step-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ws-primary);
  background: rgba(28, 191, 115, 0.12);
  vertical-align: middle;
}
.ws-skills-qr .ws-qr-hint code {
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}
.ws-center-qr-placeholder {
  height: auto !important;
  padding: 20px 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ws-muted);
}
.ws-center-approved-stats {
  display: flex;
  gap: 12px;
  margin: 12px 0 8px;
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(28, 191, 115, 0.08);
  border: 1px solid rgba(28, 191, 115, 0.14);
}
.ws-center-approved-stats > div {
  flex: 1;
  text-align: center;
}
.ws-center-approved-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--ws-primary);
}
.ws-center-approved-stats small {
  font-size: 11px;
  color: var(--ws-muted);
}
@media (max-width: 480px) {
  .ws-center-steps { grid-template-columns: 1fr; }
}
.ws-auth-card {
  background: var(--ws-surface);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px var(--ws-shadow);
  margin-bottom: 16px;
}
.ws-auth-card h3 { font-size: 15px; margin-bottom: 8px; }
.ws-auth-card p { font-size: 13px; color: var(--ws-muted); line-height: 1.7; margin-bottom: 12px; }
.ws-auth-input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}
.ws-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.ws-btn-primary { background: var(--ws-primary); color: #fff; }
.ws-btn-dark { background: var(--ws-text); color: #fff; }

.ws-error {
  text-align: center;
  padding: 40px 20px;
  color: #ff4d4f;
  font-size: 14px;
}
.ws-retry {
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--ws-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ws-ease-spring), box-shadow 0.25s ease;
}

.ws-retry:active {
  transform: scale(0.96);
}

.ws-retry:hover {
  box-shadow: 0 4px 14px rgba(28, 191, 115, 0.4);
}

.ws-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.ws-modal:not([hidden]) {
  pointer-events: auto;
}

.ws-modal[hidden] { display: none; }

.ws-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.ws-modal.ws-modal-open:not([hidden]) .ws-modal-backdrop {
  opacity: 1;
}

.ws-modal.ws-modal-closing .ws-modal-backdrop {
  opacity: 0;
}

.ws-modal-sheet {
  position: relative;
  width: 100%;
  max-height: 85dvh;
  background: var(--ws-surface);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(20px + var(--ws-safe-bottom));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.38s var(--ws-ease-out);
  will-change: transform;
}

.ws-modal.ws-modal-open:not([hidden]) .ws-modal-sheet {
  transform: translateY(0);
}

.ws-modal.ws-modal-closing .ws-modal-sheet {
  transform: translateY(100%);
}

.ws-detail-cover {
  animation: ws-cover-pop 0.45s var(--ws-ease-spring);
}

@keyframes ws-cover-pop {
  from {
    opacity: 0;
    transform: scale(0.88) rotate(-2deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
.ws-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ws-bg);
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s var(--ws-ease-spring), background 0.2s ease;
}

.ws-modal-close:active {
  transform: scale(0.9);
  background: var(--ws-border);
}
.ws-detail-head { display: flex; gap: 16px; margin-bottom: 16px; }
.ws-detail-cover { width: 96px; height: 128px; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 12px var(--ws-shadow); }
.ws-detail-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ws-detail-author { font-size: 14px; color: var(--ws-muted); margin-bottom: 10px; }
.ws-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ws-bg);
  margin-right: 6px;
  margin-bottom: 4px;
}
.ws-progress-meta {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
  line-height: 1.5;
}

.ws-progress-box {
  background: var(--ws-bg);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.ws-progress-bar {
  height: 6px;
  background: var(--ws-border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.ws-progress-fill {
  height: 100%;
  background: var(--ws-primary);
  border-radius: 3px;
  width: 0;
  transition: width 0.9s var(--ws-ease-out);
}
.ws-info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--ws-border);
  font-size: 14px;
}
.ws-notice { text-align: center; font-size: 12px; color: var(--ws-muted); margin-top: 12px; }

.ws-qr-box {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #f8faf9 0%, #fff 100%);
  border: 1px solid var(--ws-border);
  border-radius: 14px;
  text-align: center;
}

.ws-qr-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ws-text);
  margin-bottom: 4px;
}

.ws-qr-hint {
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.ws-qr-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 10px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px var(--ws-shadow);
}

.ws-qr-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: opacity 0.35s ease, transform 0.35s var(--ws-ease-out);
}

.ws-qr-img.is-refreshing {
  opacity: 0.35;
  transform: scale(0.96);
}

.ws-qr-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ws-qr-spinner.show {
  opacity: 1;
}

.ws-qr-spinner::after {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid var(--ws-border);
  border-top-color: var(--ws-primary);
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
}

.ws-qr-timer {
  font-size: 11px;
  color: #aaa;
}

.ws-detail-extra {
  margin-top: 4px;
}

.ws-ambient {
  display: none;
}

@media (min-width: 481px) {
  .ws-body {
    padding: 16px;
  }

  .ws-app {
    max-width: 520px;
    height: 100%;
    max-height: none;
    border-radius: 20px;
    box-shadow:
      0 20px 60px rgba(15, 23, 42, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.8);
  }

  .ws-tabbar {
    padding: 12px 20px calc(16px + var(--ws-safe-bottom));
  }

  .ws-tabbar-inner {
    max-width: 340px;
  }
}

@media (min-width: 768px) {
  .ws-body {
    padding: 28px 32px;
  }

  .ws-ambient {
    display: block;
    position: fixed;
    width: 260px;
    height: 380px;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    opacity: 1;
  }

  .ws-ambient-shadow {
    position: absolute;
    bottom: -30px;
    left: 4%;
    right: 4%;
    height: 64px;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.38) 0%, transparent 70%);
    filter: blur(20px);
    transform: scaleY(0.6);
    z-index: 0;
    pointer-events: none;
  }

  .ws-ambient-scene {
    position: absolute;
    inset: 0;
    perspective: 980px;
    perspective-origin: 48% 40%;
    z-index: 1;
  }

  .ws-ambient-volume {
    --ws-depth: 24px;
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
  }

  .ws-ambient-left .ws-ambient-volume {
    transform: rotateY(24deg) rotateX(7deg);
  }

  .ws-ambient-right .ws-ambient-volume {
    transform: rotateY(-24deg) rotateX(7deg);
  }

  .ws-ambient-face {
    position: absolute;
    backface-visibility: hidden;
  }

  .ws-ambient-face-front {
    inset: 0;
    transform: translateZ(calc(var(--ws-depth) / 2));
    border-radius: 3px 11px 11px 3px;
    overflow: hidden;
    background: #fff;
    box-shadow:
      0 3px 6px rgba(15, 23, 42, 0.12),
      0 22px 50px -10px rgba(15, 23, 42, 0.3);
  }

  .ws-ambient-face-front::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 16px 0 26px -8px rgba(0, 0, 0, 0.24);
  }

  .ws-ambient-face-spine {
    left: 0;
    top: 3px;
    width: var(--ws-depth);
    height: calc(100% - 6px);
    transform-origin: left center;
    transform: rotateY(-90deg);
    background-color: #2a2a2a;
    background-size: 640% auto;
    background-position: left center;
    background-repeat: no-repeat;
    filter: brightness(0.56) saturate(1.1);
    box-shadow: inset -5px 0 12px rgba(0, 0, 0, 0.38);
    border-radius: 3px 0 0 3px;
  }

  .ws-ambient-face-spine::after {
    content: '';
    position: absolute;
    inset: 8% 0 8% 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 65%);
    border-radius: 1px;
  }

  .ws-ambient-face-pages {
    right: 0;
    top: 5px;
    width: var(--ws-depth);
    height: calc(100% - 10px);
    transform-origin: right center;
    transform: rotateY(90deg);
    background:
      linear-gradient(90deg, #d2cdc4 0%, #f8f5ee 22%, #ebe6dd 48%, #d8d3ca 72%, #c8c3ba 100%),
      repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0px,
        rgba(255, 255, 255, 0) 1px,
        rgba(0, 0, 0, 0.07) 1px,
        rgba(0, 0, 0, 0.07) 2px
      );
    box-shadow: inset 4px 0 8px rgba(0, 0, 0, 0.1);
    border-radius: 0 2px 2px 0;
  }

  .ws-ambient-face-pages::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.3) 0%,
      transparent 18%,
      transparent 82%,
      rgba(0, 0, 0, 0.08) 100%
    );
    pointer-events: none;
  }

  .ws-ambient-face-top {
    left: 3px;
    right: 3px;
    top: 0;
    height: var(--ws-depth);
    transform-origin: top center;
    transform: rotateX(90deg);
    background: linear-gradient(90deg, #d5d0c7, #f3f0e8 45%, #d5d0c7);
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.07);
  }

  .ws-ambient-face-bottom {
    left: 3px;
    right: 3px;
    bottom: 0;
    height: var(--ws-depth);
    transform-origin: bottom center;
    transform: rotateX(-90deg);
    background: linear-gradient(90deg, #bbb6ad, #e2ded6 45%, #bbb6ad);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .ws-ambient-right .ws-ambient-face-front {
    border-radius: 11px 3px 3px 11px;
  }

  .ws-ambient-right .ws-ambient-face-front::after {
    box-shadow: inset -16px 0 26px -8px rgba(0, 0, 0, 0.24);
  }

  .ws-ambient-right .ws-ambient-face-spine {
    left: auto;
    right: 0;
    transform-origin: right center;
    transform: rotateY(90deg);
    background-position: right center;
    box-shadow: inset 5px 0 12px rgba(0, 0, 0, 0.38);
    border-radius: 0 3px 3px 0;
  }

  .ws-ambient-right .ws-ambient-face-spine::after {
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.18), transparent 65%);
  }

  .ws-ambient-right .ws-ambient-face-pages {
    right: auto;
    left: 0;
    transform-origin: left center;
    transform: rotateY(-90deg);
    border-radius: 2px 0 0 2px;
    box-shadow: inset -4px 0 8px rgba(0, 0, 0, 0.1);
  }

  .ws-ambient-book-gloss {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 255, 255, 0.06) 34%,
      transparent 54%,
      rgba(0, 0, 0, 0.09) 100%
    );
  }

  .ws-ambient-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
  }

  .ws-ambient-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    will-change: opacity, filter;
  }

  .ws-ambient-cover img.ws-ambient-current {
    opacity: 1;
    filter: blur(0);
    z-index: 1;
  }

  .ws-ambient-cover img.ws-ambient-enter {
    z-index: 2;
    animation: ws-ambient-in 1.8s ease-in-out forwards;
  }

  .ws-ambient-cover img.ws-ambient-leave {
    z-index: 1;
    animation: ws-ambient-out 1.8s ease-in-out forwards;
  }

  @keyframes ws-ambient-in {
    from {
      opacity: 0;
      filter: blur(10px);
    }
    to {
      opacity: 1;
      filter: blur(0);
    }
  }

  @keyframes ws-ambient-out {
    from {
      opacity: 1;
      filter: blur(0);
    }
    to {
      opacity: 0;
      filter: blur(8px);
    }
  }

  .ws-ambient-left {
    left: 3%;
    top: 14%;
    animation: ws-ambient-float-left 6s ease-in-out infinite;
    will-change: transform;
  }

  .ws-ambient-right {
    right: 3%;
    top: 24%;
    animation: ws-ambient-float-right 6.8s ease-in-out infinite;
    will-change: transform;
  }

  @keyframes ws-ambient-float-left {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
  }

  @keyframes ws-ambient-float-right {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
  }

  .ws-app {
    max-width: 720px;
    height: 100%;
    border-radius: 24px;
  }

  .ws-header {
    padding: 18px 24px;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
  }

  .ws-header-title {
    font-size: 20px;
  }

  .ws-stats-bar {
    gap: 8px;
    padding: 10px 24px 12px;
  }

  .ws-stat-item {
    min-width: 62px;
    padding: 8px 6px 7px;
    border-radius: 11px;
  }

  .ws-stat-num {
    font-size: 18px;
  }

  .ws-stat-label {
    font-size: 11px;
  }

  .ws-filters {
    padding: 14px 24px;
  }

  .ws-grid-wrap {
    padding: 0 24px 24px;
  }

  .ws-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .ws-book-title {
    font-size: 14px;
  }

  .ws-tabbar {
    position: sticky;
    padding: 14px 24px calc(18px + var(--ws-safe-bottom));
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.9) 40%, #fff 100%);
    box-shadow: none;
  }

  .ws-tabbar-inner {
    max-width: 360px;
  }

  .ws-main {
    padding-bottom: 0;
  }

  .ws-stats-page {
    padding: 12px 24px 24px;
  }
}

@media (min-width: 1024px) {
  .ws-body {
    padding: 32px 48px;
  }

  .ws-app {
    max-width: 960px;
    height: 100%;
  }

  .ws-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }

  .ws-stats-bar {
    padding: 8px 28px 10px;
  }

  .ws-filters {
    padding: 16px 28px;
  }

  .ws-grid-wrap {
    padding: 0 28px 28px;
  }

  .ws-stats-page {
    padding: 12px 28px 28px;
  }
}

@media (min-width: 1280px) {
  .ws-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Motion enhancements */
.ws-tab-bump {
  animation: none;
}

.ws-tab.active.ws-tab-bump .ws-tab-icon {
  animation: ws-tab-bump-active 0.42s var(--ws-ease-spring);
}

@keyframes ws-tab-bump-active {
  0% { transform: scale(0.88); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1.05); }
}

.ws-btn,
.ws-btn-link {
  transition: transform 0.2s var(--ws-ease-spring), opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ws-btn:active:not(:disabled),
.ws-btn-link:active {
  transform: scale(0.97);
}

.ws-mine-card {
  transition: box-shadow 0.25s ease, transform 0.25s var(--ws-ease-out);
}

.ws-mine-page .ws-mine-card.ws-animate-item {
  animation: ws-mine-card-in 0.48s var(--ws-ease-out) backwards;
  animation-delay: calc(var(--ws-i, 0) * 70ms);
}

@keyframes ws-mine-card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ws-profile-stats > div {
  transition: transform 0.25s var(--ws-ease-spring);
}

.ws-profile-stat-num.ws-stat-pop {
  animation: ws-stat-pop 0.45s var(--ws-ease-spring);
}

@keyframes ws-stat-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); color: var(--ws-primary-dark); }
  100% { transform: scale(1); }
}

.ws-member-pill {
  transition: transform 0.22s var(--ws-ease-spring), box-shadow 0.22s ease, background 0.22s ease;
}

.ws-member-pill:active {
  transform: scale(0.96);
}

.ws-member-chip {
  transition: transform 0.22s var(--ws-ease-spring), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.ws-member-chip:active {
  transform: scale(0.96);
}

.ws-member-chip.active {
  box-shadow: 0 4px 12px rgba(28, 191, 115, 0.2);
}

.ws-qr-img.ws-qr-ready {
  animation: ws-qr-in 0.35s var(--ws-ease-out);
}

@keyframes ws-qr-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ws-key-guide[open] .ws-key-guide-body {
  animation: ws-guide-open 0.32s var(--ws-ease-out);
}

@keyframes ws-guide-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ws-scope-btn,
.ws-filter,
.ws-stat-item {
  transition: transform 0.2s var(--ws-ease-spring), background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ws-scope-btn:active,
.ws-filter:active,
.ws-stat-item:active {
  transform: scale(0.96);
}

.ws-book {
  transition: transform 0.28s var(--ws-ease-spring), box-shadow 0.28s ease;
}

.ws-progress-fill {
  transition: width 0.9s var(--ws-ease-out);
}

.ws-sync-hint.is-visible {
  animation: ws-hint-in 0.32s var(--ws-ease-out);
}

@keyframes ws-hint-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}
