/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --c-primary:        #59B292;
  --c-primary-hover:  #4A9A7E;
  --c-primary-light:  #EAF7F2;
  --c-primary-glow:   rgba(89,178,146,0.22);
  --c-accent:         #FFC94D;
  --c-accent-hover:   #E8B42A;
  --c-accent-light:   #FFF8E1;
  --c-coral:          #FA6781;
  --c-bg:             #FBF8F4;
  --c-card:           #FFFFFF;
  --c-text:           #1C1917;
  --c-text-muted:     #78716C;
  --c-border:         #E7E0D8;
  --c-border-focus:   #59B292;
  --c-danger:         #EF4444;
  --c-success:        #10B981;

  --radius-sm:  5px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-full: 999px;

  --shadow-sm:  0 1px 3px rgba(14,7,32,0.06), 0 1px 2px rgba(14,7,32,0.04);
  --shadow-md:  0 4px 16px rgba(14,7,32,0.10), 0 2px 4px rgba(14,7,32,0.06);
  --shadow-lg:  0 16px 48px rgba(14,7,32,0.14), 0 4px 12px rgba(14,7,32,0.08);

  --nav-height: 64px;
  --nav-height-mobile: 56px;
  --container:  1120px;

  --font-sans:    'Outfit', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-text); text-decoration: none; }
a:hover { color: var(--c-primary); text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }

p { color: var(--c-text-muted); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  flex: 1;
  padding: 3rem 0 5rem;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-text) !important;
  text-decoration: none !important;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.nav__brand svg, .nav__brand img { flex-shrink: 0; }

.nav__search {
  flex: 1;
  max-width: 320px;
}

.nav__search form {
  position: relative;
  display: flex;
  align-items: center;
}

.nav__search input {
  width: 100%;
  padding: 0.45rem 2.25rem 0.45rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  background: var(--c-card);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nav__search input:focus {
  outline: none;
  border-color: var(--c-border-focus);
  box-shadow: 0 0 0 3px var(--c-primary-glow);
}

.nav__search-btn {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
}
.nav__search-btn:hover { color: var(--c-primary); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  list-style: none;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav__links a:hover {
  color: var(--c-text);
  background: var(--c-primary-light);
  text-decoration: none;
}

.nav__links .btn { margin-left: 0.25rem; }
.nav__links a.btn-primary { color: #fff; }
.nav__links a.btn-primary:hover { color: #fff; background: var(--c-primary-hover); }

/* ── Notification bell ───────────────────────────────────────── */
.nav__notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--c-text-muted);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav__notif-btn:hover { color: var(--c-primary); background: var(--c-primary-light); }
.nav__notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--c-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.mobile-menu__notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--c-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Nav dropdown ────────────────────────────────────────────── */
.nav__dropdown { position: relative; }

.nav__dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav__dropdown-trigger:hover,
.nav__dropdown--open .nav__dropdown-trigger {
  color: var(--c-text);
  background: var(--c-primary-light);
}

.nav__dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  list-style: none;
  padding: 0.35rem 0;
  z-index: 200;
}
.nav__dropdown--open .nav__dropdown-menu { display: block; }

.nav__dropdown-menu li a {
  display: block;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s;
}
.nav__dropdown-menu li a:hover { background: var(--c-primary-light); }

.nav__dropdown-divider {
  height: 1px;
  background: var(--c-border);
  margin: 0.35rem 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none !important;
  line-height: 1;
  min-height: 38px;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--c-primary-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--c-text);
  border: 1.5px solid var(--c-border);
}
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--c-text-muted);
  border: 1.5px solid var(--c-border);
}
.btn-ghost:hover { color: var(--c-text); border-color: var(--c-text-muted); background: var(--c-card); }

.btn-danger {
  background: var(--c-danger);
  color: #fff;
}
.btn-danger:hover { background: #DC2626; color: #fff; }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; min-height: 32px; }
.btn-lg { padding: 0.8rem 1.9rem; font-size: 1rem; min-height: 46px; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 span {
  background: linear-gradient(135deg, #59B292, #FA6781);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Section header ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-header h2 { margin: 0; }

.section-header__title--trending {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.section-header__title--trending::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-coral);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

.home-section { margin-bottom: 3.5rem; }

/* ── Daily quote card ────────────────────────────────────────── */
.quote-of-day {
  max-width: 600px;
  margin: 0 auto 2.25rem;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--c-primary);
  background: var(--c-primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.quote-of-day__text {
  font-size: 0.975rem;
  font-style: italic;
  color: var(--c-text);
  line-height: 1.65;
  margin: 0 0 0.45rem;
}
.quote-of-day__author {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text-muted);
  letter-spacing: 0.03em;
  margin: 0;
}

/* ── Event card ──────────────────────────────────────────────── */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Series stacked-card wrapper */
.event-card-series-wrap {
  position: relative;
}
.event-card-series-wrap::before,
.event-card-series-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  pointer-events: none;
}
.event-card-series-wrap::before {
  transform: translate(4px, 5px);
  opacity: 0.7;
  z-index: 0;
}
.event-card-series-wrap::after {
  transform: translate(8px, 10px);
  opacity: 0.4;
  z-index: -1;
}
.event-card-series-wrap .event-card {
  position: relative;
  z-index: 1;
}

.event-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.22s, border-color 0.22s, transform 0.22s;
  text-decoration: none !important;
  color: inherit;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.event-card__thumb {
  margin: -1.25rem -1.25rem 0;
  height: 140px;
  overflow: hidden;
  position: relative;
}
.event-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.event-card:hover .event-card__thumb img {
  transform: scale(1.04);
}
.event-card__thumb .event-card__rank {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
}

.event-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary);
  transform: translateY(-3px);
  text-decoration: none;
}

.event-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }

.event-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}

.event-card__meta {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.event-card__ticker {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: -0.02em;
}

.event-card__ticker-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
}

.event-card__ticker-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

.event-card__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

/* ── Follow button (card) ────────────────────────────────────── */
.follow-form { margin-left: auto; }

.follow-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.follow-btn:hover        { color: #E53E3E; transform: scale(1.2); text-decoration: none; }
.follow-btn--active      { color: #E53E3E; }

/* ── Event stats (views + follows) ──────────────────────────── */
.event-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--c-text-muted);
}
.event-stat svg { flex-shrink: 0; }
.event-stat--lg { font-size: 0.9rem; }

.event-detail__stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ── Share widget ────────────────────────────────────────────── */
.share-widget { position: relative; }

.share-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 190px;
  z-index: 200;
  padding: 0.35rem 0;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
  text-decoration: none;
}
.share-option:hover { background: var(--c-bg); }

.share-divider { border: none; border-top: 1px solid var(--c-border); margin: 0.3rem 0; }

/* ── Rank badge ──────────────────────────────────────────────── */
.event-card__rank {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--c-primary);
  background: var(--c-primary-light);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
  align-self: flex-start;
}

.event-card--ranked { position: relative; }

/* ── Ticker (detail page) ────────────────────────────────────── */
.ticker-hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #FAF3EA 0%, #FAE7CB 100%);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

.ticker-hero__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ticker-hero__display {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 0 60px var(--c-primary-glow);
}

.ticker-hero__date {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--c-text-muted);
}

/* ── Event detail page ───────────────────────────────────────── */
.event-detail__header { margin-bottom: 0.25rem; }
.event-detail__header h1 { margin-bottom: 0.4rem; }

.event-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.event-detail__cover-wrap {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  background: #000;
}
.event-detail__cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.55);
  transform: scale(1.08);
}
.event-detail__cover {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.event-detail__body { margin: 1.5rem 0; font-size: 1rem; color: var(--c-text); line-height: 1.8; }

.event-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary { background: var(--c-primary-light); color: var(--c-primary); }
.badge-muted   { background: #F0EFF8; color: var(--c-text-muted); }
.badge-success { background: #ECFDF5; color: #065F46; }
.badge-series  { background: #FFF3E0; color: #B45309; }

.tag {
  display: inline-block;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  padding: 0.15em 0.65em;
  font-size: 0.78rem;
  color: var(--c-text-muted);
}

/* ── Dot separator ───────────────────────────────────────────── */
.dot::before { content: '·'; margin: 0 0.15rem; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 640px;
}

.form-group { margin-bottom: 1.25rem; position: relative; }

.form-label {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.4rem;
}

.form-label .hint {
  font-weight: 400;
  color: var(--c-text-muted);
  font-size: 0.8rem;
  margin-left: 0.35rem;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { display: none; }
input[type="search"] { -moz-appearance: none; appearance: none; }

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-card);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

textarea { resize: vertical; min-height: 100px; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-border-focus);
  box-shadow: 0 0 0 3px var(--c-primary-glow);
}

.form-error {
  font-size: 0.8rem;
  color: var(--c-danger);
  margin-top: 0.3rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

/* ── Card (generic) ──────────────────────────────────────────── */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* ── Profile ─────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  flex-shrink: 0;
  align-self: flex-start;
}

/* ── Horizontal badge strip (cards, detail page) ─────────────── */
.badge-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.badge-strip__item {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--c-bg);
  cursor: default;
  flex-shrink: 0;
}
.badge-strip__item svg { width: 9px; height: 9px; flex-shrink: 0; }
.badge-strip__item--more {
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--c-bg-alt);
  color: var(--c-text-muted);
  border-color: var(--c-border);
  letter-spacing: -0.02em;
}
.badge-strip--sm .badge-strip__item { width: 20px; height: 20px; }
.badge-strip--sm .badge-strip__item svg { width: 10px; height: 10px; }
.profile-badge-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.6rem;
  flex-wrap: nowrap;
}
.profile-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-bg);
  cursor: default;
  flex-shrink: 0;
}
.profile-badge svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}
.profile-badge--overflow {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--c-bg-alt);
  color: var(--c-text-muted);
  border-color: var(--c-border);
  letter-spacing: -0.02em;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--c-card);
  box-shadow: var(--shadow-md);
  display: block;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #59B292, #FFC94D);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.avatar--xs { width: 32px; height: 32px; }
.avatar-placeholder--xs { width: 32px; height: 32px; font-size: 0.85rem; }
.avatar--sm { width: 40px; height: 40px; }
.avatar-placeholder--sm { width: 40px; height: 40px; font-size: 1rem; }
.avatar--md { width: 52px; height: 52px; }
.avatar-placeholder--md { width: 52px; height: 52px; font-size: 1.25rem; }

.profile-avatar-wrap--md .profile-badge svg { width: 9px; height: 9px; }

.creator-avatar-link { text-decoration: none; flex-shrink: 0; }
.event-card__series-strip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: -1.25rem -1.25rem 0;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(90deg, #FFF3E0, #FFF8F0);
  border-bottom: 1px solid #FFD59E;
  font-size: 0.72rem;
  font-weight: 700;
  color: #B45309;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.event-card__series-strip svg { flex-shrink: 0; opacity: 0.8; }
.event-card__series-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.event-card__series-part {
  flex-shrink: 0;
  opacity: 0.7;
  font-weight: 600;
}

.event-card__creator { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.event-card__creator-name { font-size: 0.8rem; font-weight: 600; color: var(--c-text); }
.event-detail__creator { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.event-detail__creator-name { font-weight: 600; color: var(--c-text); }

.event-creator-actions { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; position: relative; }
.event-creator-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  font: 500 0.8rem/1 inherit;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  background: var(--c-card);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-decoration: none;
}
.event-creator-btn:hover { color: var(--c-text); border-color: var(--c-text-muted); background: var(--c-bg); text-decoration: none; }
.event-creator-btn--danger:hover { color: var(--c-danger); border-color: var(--c-danger); background: #fff5f5; }

.profile-info { flex: 1; min-width: 0; }
.profile-info h1 { margin-bottom: 0.2rem; }
.profile-info .full-name { color: var(--c-text-muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.profile-info .bio { color: var(--c-text); font-size: 0.9rem; margin-bottom: 0.75rem; }

.profile-stats {
  display: flex;
  gap: 1.5rem;
}

.profile-stat { text-align: center; }
.profile-stat__num { font-size: 1.2rem; font-weight: 700; color: var(--c-text); line-height: 1; }
.profile-stat__label { font-size: 0.75rem; color: var(--c-text-muted); margin-top: 0.1rem; }

/* ── Dashboard sections ──────────────────────────────────────── */
.dashboard-section { margin-bottom: 2.5rem; }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 2rem;
}
.tabs__tab {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tabs__tab:hover { color: var(--c-text); }
.tabs__tab--active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
.tabs__panel--hidden { display: none; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
}
.empty-state__icon { margin-bottom: 1rem; opacity: 0.4; }
.empty-state__title { font-size: 1.1rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 0.5rem; }

/* ── Search page ─────────────────────────────────────────────── */
.search-form {
  margin-bottom: 2rem;
}
.search-form__row {
  display: flex;
  gap: 0.5rem;
}
.search-input-wrap {
  position: relative;
  flex: 1;
}
.search-form__row input[type="search"] {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--c-card);
  color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-form__row input[type="search"]:focus {
  outline: none;
  border-color: var(--c-border-focus);
  box-shadow: 0 0 0 3px var(--c-primary-glow);
}

/* autocomplete dropdown */
.search-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 60;
  list-style: none;
  margin: 0; padding: 0.25rem 0;
  max-height: 260px;
  overflow-y: auto;
}
.search-suggest__item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--c-text);
}
.search-suggest__item:hover,
.search-suggest__item.active {
  background: var(--c-primary-light);
  color: var(--c-primary);
}
.search-suggest__date {
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
}
.search-suggest__date label {
  color: var(--c-text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.search-suggest__date input[type="date"] {
  flex: 1;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
}

/* active filter chips */
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.search-chip {
  display: inline-flex;
  align-items: center;
  background: var(--c-primary-light);
  color: var(--c-primary);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

/* syntax cheat-sheet */
.search-syntax {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.search-syntax > summary {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--c-text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}
.search-syntax > summary::-webkit-details-marker { display: none; }
.search-syntax__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.4rem 1.5rem;
  padding: 0 1rem 0.9rem;
}
.search-syntax__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.search-syntax__token {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
  color: var(--c-primary);
  flex-shrink: 0;
}
.search-syntax__desc {
  color: var(--c-text-muted);
  font-size: 0.78rem;
}

.search-prompt {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--c-text-muted);
}
.search-prompt__icon { margin-bottom: 1rem; opacity: 0.3; }
.search-prompt p { margin-bottom: 1.25rem; font-size: 1rem; }

.mt-2 { margin-top: 0.75rem; }

/* ── Category pills (homepage) ───────────────────────────────── */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.category-pill:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-light);
  text-decoration: none;
}

/* ── Flash messages ──────────────────────────────────────────── */
.messages { margin-bottom: 1.5rem; }

.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid;
}
.message-success { background: #ECFDF5; border-color: var(--c-success); color: #065F46; }
.message-error   { background: #FEF2F2; border-color: var(--c-danger);  color: #991B1B; }
.message-info    { background: var(--c-primary-light); border-color: var(--c-primary); color: #3730A3; }
.message-warning { background: #FFFBEB; border-color: #F59E0B; color: #92400E; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.18s ease;
}

@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--c-text);
}

.modal__body {
  color: var(--c-text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal__actions form { display: contents; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--c-border);
  padding: 1.5rem 0;
  margin-top: auto;
  text-align: center;
}
.footer p { font-size: 0.8rem; color: var(--c-text-muted); margin: 0; }
.footer p:first-child { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: var(--c-text);
  vertical-align: middle;
}
.footer__brand svg, .footer__brand img { display: block; }

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-card__logo {
  text-align: center;
  margin-bottom: 0.5rem;
}
.auth-card__logo img {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.auth-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.35rem;
}

.auth-card__sub {
  text-align: center;
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-bottom: 2rem;
}

.auth-divider {
  font-size: 0.8rem;
  text-align: center;
  color: var(--c-text-muted);
  margin: 1.5rem 0;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.terms-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--c-primary);
  cursor: pointer;
}
.terms-row label {
  font-size: 0.875rem;
  color: var(--c-text);
  cursor: pointer;
  line-height: 1.5;
}
.terms-row label a { font-weight: 600; }

/* ── Follower count ──────────────────────────────────────────── */
.follower-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header { margin-bottom: 2.5rem; }
.page-header h1 { margin-bottom: 0.35rem; }

.notice-banner {
  padding: 0.75rem 1rem;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #92400E;
}

/* ── Utility ─────────────────────────────────────────────────── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-muted { color: var(--c-text-muted); }
.text-center { text-align: center; }

/* ── Language switcher ───────────────────────────────────────── */
.lang-select {
  padding: 0.25rem 0.5rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--c-text-muted);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: border-color 0.15s, color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238B8FA8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
}
.lang-select:hover, .lang-select:focus {
  border-color: var(--c-primary);
  color: var(--c-primary);
  outline: none;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2rem;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.5rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
a.pagination__btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-light);
}
.pagination__btn--active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.pagination__btn--disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── Notification picker (on event detail) ───────────────────── */
.notif-picker {
  margin-top: 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-card);
  overflow: hidden;
}
.notif-picker[hidden] { display: none; }

.notif-picker__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  color: var(--c-text);
  user-select: none;
}
.notif-picker__summary::-webkit-details-marker { display: none; }
.notif-picker__summary svg { color: var(--c-primary); }
.notif-picker[open] .notif-picker__summary { border-bottom: 1.5px solid var(--c-border); }

.notif-picker__body { padding: 0.75rem 1rem; }
.notif-picker__body .form-group select { width: 100%; }

/* ── Subscription list ───────────────────────────────────────── */
.subscription-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.subscription-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
}

.subscription-row__event {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.subscription-row__title {
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subscription-row__date {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.subscription-row__form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.subscription-row__digest {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  white-space: nowrap;
}
.subscription-row__digest input { accent-color: var(--c-primary); }
.subscription-row__next {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* ── Folder tree ─────────────────────────────────────────────── */
.folder-tree {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  padding-left: calc(0.75rem + var(--depth, 0) * 1.5rem);
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.folder-row:hover { border-color: var(--c-primary); }

.folder-row__icon { color: var(--c-primary); flex-shrink: 0; }
.folder-row__name {
  flex: 1;
  font-weight: 500;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-row__name:hover { text-decoration: underline; }

.folder-row__count {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  white-space: nowrap;
}

.folder-row__actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Clickable variant used on dashboard */
a.folder-row--link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
a.folder-row--link:hover { text-decoration: none; border-color: var(--c-primary); }

.folder-tree--compact .folder-row {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* ── Subfolder grid (inside folder detail) ───────────────────── */
.subfolder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

.subfolder-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}
.subfolder-card:hover {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
  text-decoration: none;
}
.subfolder-card svg { color: var(--c-primary); flex-shrink: 0; }
.subfolder-card__count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--c-text-muted);
  background: var(--c-bg);
  border-radius: var(--radius-full);
  padding: 0.1rem 0.45rem;
  flex-shrink: 0;
}

/* ── Folder picker (on event detail page) ────────────────────── */
.folder-picker {
  margin-top: 1.5rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-card);
  overflow: hidden;
}

.folder-picker__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  color: var(--c-text);
  user-select: none;
}
.folder-picker__summary::-webkit-details-marker { display: none; }
.folder-picker__summary svg { color: var(--c-primary); }
.folder-picker[open] .folder-picker__summary { border-bottom: 1.5px solid var(--c-border); }

.folder-picker__body { padding: 0.75rem 1rem; }

.folder-pick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  padding-left: calc(var(--depth, 0) * 1.25rem);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--c-text);
}
.folder-pick input[type="checkbox"] { accent-color: var(--c-primary); width: 15px; height: 15px; flex-shrink: 0; }
.folder-pick svg { color: var(--c-primary); flex-shrink: 0; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--c-text-muted);
}
.breadcrumb a { color: var(--c-primary); }
.breadcrumb__sep { color: var(--c-text-muted); }

/* ── Feedback button ─────────────────────────────────────────── */
.feedback-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
  padding: 0;
}
.feedback-btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  box-shadow: var(--shadow-md);
}

/* ── Folder sharing ──────────────────────────────────────────── */
.folder-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-muted);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
}

.folder-share-panel {
  border-top: 1px solid var(--c-border);
  padding-top: 1.5rem;
}

.folder-share-toggle {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-card);
}

.folder-share-toggle__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  color: var(--c-text);
  user-select: none;
}
.folder-share-toggle__summary::-webkit-details-marker { display: none; }
.folder-share-toggle[open] .folder-share-toggle__summary { border-bottom: 1.5px solid var(--c-border); }

.folder-share-count {
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 0.1rem 0.5rem;
}

.folder-share-body { padding: 1rem; }

.folder-share-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.folder-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: var(--c-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
}

.folder-share-username {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
}

.folder-share-empty {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.folder-share-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.share-autocomplete {
  position: relative;
  flex: 1;
  max-width: 240px;
}
.share-autocomplete input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  background: var(--c-card);
  color: var(--c-text);
  transition: border-color 0.15s;
}
.share-autocomplete input:focus {
  outline: none;
  border-color: var(--c-border-focus);
}

.share-autocomplete__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  max-height: 200px;
  overflow-y: auto;
}

.share-autocomplete__item {
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--c-text);
  transition: background 0.1s, color 0.1s;
}
.share-autocomplete__item:hover,
.share-autocomplete__item--active {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

/* ── Subscription (notification) indicators ─────────────────── */
.event-card__badges {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 1.5rem;
  margin-bottom: 0.25rem;
}

.event-card__notif {
  display: inline-flex;
  align-items: center;
  color: var(--c-primary);
  background: var(--c-primary-light);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  gap: 0.2rem;
}

.event-card__notif--corner {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.4rem;
}

.event-stat--notif { color: var(--c-primary); }
.event-stat--notif svg { color: var(--c-primary); }

.ticker-hero__notif {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-primary-light);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

/* ── Comments ────────────────────────────────────────────────── */
.comments-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}
.comments-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.comments-section__count {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--c-primary-light);
  color: var(--c-primary);
  border-radius: var(--radius-full);
  padding: 0.1rem 0.55rem;
}
.comments-login-hint {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
}
/* ── Comment form ──────────────────────────────────────────────── */
.comment-form-wrap {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.comment-form { flex: 1; min-width: 0; }
.comment-form__input-wrap {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 1.25rem;
  padding: 0.6rem 0.9rem 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.comment-form__input-wrap:focus-within {
  border-color: var(--c-border-focus);
  box-shadow: 0 0 0 3px rgba(89,178,146,0.1);
}
.comment-form textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  resize: none;
  color: var(--c-text);
  min-height: 38px;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.5;
  outline: none;
}
.comment-form textarea::placeholder { color: var(--c-text-muted); }
.comment-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--c-border);
}
.emoji-btn-wrap { position: relative; }
.emoji-btn {
  background: none;
  border: none;
  padding: 0.15rem 0.25rem;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.emoji-btn:hover { color: var(--c-text); background: var(--c-bg); }
.emoji-picker-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 300;
  display: none;
}
.emoji-picker-popup.open { display: block; }
emoji-picker { --border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.comment-form--reply {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ── Comment list ──────────────────────────────────────────────── */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.comment {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.comment--reply { gap: 0.55rem; }
.comment__content { flex: 1; min-width: 0; }
.comment__bubble {
  display: inline-block;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 1rem 1rem 1rem 0.2rem;
  padding: 0.55rem 0.85rem 0.6rem;
  max-width: 100%;
}
.comment--reply .comment__bubble {
  border-radius: 0.85rem 0.85rem 0.85rem 0.2rem;
  background: var(--c-bg);
}
.comment__author {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--c-text);
  margin-bottom: 0.15rem;
  text-decoration: none;
}
.comment__author:hover { color: var(--c-primary); }
.comment__body { font-size: 0.9rem; line-height: 1.5; }
.comment__body p { margin: 0; }
.comment__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  padding-left: 0.25rem;
}
.comment__time {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}
.comment__reply-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.comment__reply-btn:hover { color: var(--c-primary); }
.comment__delete-form { margin: 0; }
.comment__delete-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.comment__delete-btn:hover { color: var(--c-danger); }
.comment-replies {
  margin-top: 0.65rem;
  margin-left: 0.5rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.reply-form-wrap {
  display: none;
  margin-top: 0.5rem;
}
.reply-form-wrap.open { display: flex; gap: 0.55rem; align-items: flex-start; }
.comments-empty {
  font-size: 0.9rem;
  color: var(--c-text-muted);
}

/* ── Milestone badges ────────────────────────────────────────── */
.milestone-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.milestone-badge--passed      { background: #F3F4F6; color: #6B7280; }
.milestone-badge--1d          { background: #FEE2E2; color: #B91C1C; }
.milestone-badge--7d          { background: #FEF3C7; color: #92400E; }
.milestone-badge--30d         { background: #DBEAFE; color: #1E40AF; }
.milestone-badge--90d         { background: #EDE9FE; color: #5B21B6; }
.milestone-badge--just_happened { background: #D1FAE5; color: #065F46; }
.milestone-badge--7d_past     { background: #DBEAFE; color: #1E40AF; }
.milestone-badge--upcoming    { background: #FEF3C7; color: #92400E; }

/* ── Progress ring ───────────────────────────────────────────── */
.ticker-ring-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0.35rem auto 0.1rem;
  flex-shrink: 0;
}
.ticker-ring-wrap--lg {
  width: 160px;
  height: 160px;
  margin: 1rem auto;
}
.ticker-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ticker-ring__track {
  stroke: var(--c-border);
  stroke-width: 2.8;
}
.ticker-ring__fill {
  stroke: var(--c-primary);
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}
.ticker-ring__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.25rem;
}
.ticker-ring__inner .event-card__ticker {
  font-size: 0.85rem;
  line-height: 1.1;
}
.ticker-ring__inner .event-card__ticker-label {
  font-size: 0.58rem;
}
.ticker-ring-wrap--lg .ticker-ring__inner .ticker-hero__display {
  font-size: 1.5rem;
  line-height: 1.1;
}
.ticker-ring-wrap--lg .ticker-ring__inner .ticker-hero__label {
  font-size: 0.75rem;
}

/* ── Achievement collapsible panel ───────────────────────────── */
.achievements-panel { margin: 2rem 0; }
.achievements-panel > .achievement-list { margin-top: 0.75rem; }
.achievements-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-card);
  transition: background 0.15s;
}
.achievements-summary::-webkit-details-marker { display: none; }
.achievements-summary:hover { background: var(--c-bg-alt); }
.achievements-summary__title { font-weight: 700; font-size: 0.9rem; color: var(--c-text); flex: 1; }
.achievements-summary__meta { font-size: 0.8rem; color: var(--c-primary); font-weight: 600; }
.achievements-summary__chevron { color: var(--c-text-muted); transition: transform 0.2s; flex-shrink: 0; }
details[open] .achievements-summary__chevron { transform: rotate(180deg); }
.achievement-list { display: flex; flex-direction: column; gap: 0.5rem; }
.achievement-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  opacity: 0.55;
}
.achievement-row--earned { opacity: 1; border-color: var(--c-primary); }
.achievement-row__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-text-muted);
}
.achievement-row--earned .achievement-row__icon {
  background: var(--c-primary);
  color: #fff;
}
.achievement-row__icon svg { width: 15px; height: 15px; }
.achievement-row__body { flex: 1; min-width: 0; }
.achievement-row__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.achievement-row__name { font-weight: 600; font-size: 0.875rem; color: var(--c-text); }
.achievement-row__status { font-size: 0.75rem; color: var(--c-text-muted); white-space: nowrap; }
.achievement-row--earned .achievement-row__status { color: var(--c-primary); font-weight: 600; }
.achievement-row__desc { font-size: 0.75rem; color: var(--c-text-muted); margin-bottom: 0.45rem; }
.achievement-row__bar {
  height: 5px;
  background: var(--c-border);
  border-radius: 999px;
  overflow: hidden;
}
.achievement-row__fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 3px;
}
.achievement-row__label {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-top: 0.25rem;
}

/* ── Achievement badges ──────────────────────────────────────── */
.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.achievement-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}
.achievement-badge__icon { font-size: 1.1rem; line-height: 1; }
.achievement-badge__info { display: flex; flex-direction: column; gap: 0.1rem; }
.achievement-badge__label { font-weight: 700; color: var(--c-text); line-height: 1.2; }
.achievement-badge__desc  { font-size: 0.7rem; color: var(--c-text-muted); line-height: 1.2; }

/* ── Mobile hamburger button ─────────────────────────────────── */
.nav__hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  color: var(--c-text);
  margin-left: auto;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
}
.nav__hamburger:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* ── Mobile menu overlay ─────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  animation: fadeIn 0.2s ease;
}

.mobile-menu__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: var(--c-card);
  border-left: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: slideInRight 0.22s ease;
  box-shadow: var(--shadow-lg);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: var(--nav-height);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.mobile-menu__close {
  background: none;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  color: var(--c-text-muted);
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
}
.mobile-menu__close:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.mobile-menu__search {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.mobile-menu__search form {
  position: relative;
  display: flex;
  align-items: center;
}
.mobile-menu__search input {
  width: 100%;
  padding: 0.6rem 2.4rem 0.6rem 0.9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-bg);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--c-text);
}
.mobile-menu__search input:focus {
  outline: none;
  border-color: var(--c-border-focus);
  box-shadow: 0 0 0 3px var(--c-primary-glow);
}
.mobile-menu__search-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
}

.mobile-menu__nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.mobile-menu__section {
  border-top: 1px solid var(--c-border);
  padding: 0.75rem 0;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  min-height: 48px;
}
.mobile-menu__link:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
  text-decoration: none;
}
.mobile-menu__link--primary {
  font-weight: 700;
  color: var(--c-primary);
}
.mobile-menu__link--danger:hover {
  background: #FEF2F2;
  color: var(--c-danger);
}

.mobile-menu__label {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
}

.mobile-menu__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}

.mobile-menu__auth {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
}
.mobile-menu__auth .btn { justify-content: center; min-height: 46px; font-size: 0.95rem; }

/* ── Responsive breakpoints ──────────────────────────────────── */
@media (max-width: 768px) {
  .nav__hamburger { display: flex; align-items: center; }
  .nav__search    { display: none; }
  .nav__links     { display: none; }
  .nav { height: var(--nav-height-mobile); }
  .nav__inner { height: var(--nav-height-mobile); }

  .leaderboard-grid { grid-template-columns: 1fr; }
  .subscription-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .subscription-row__form { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .event-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; }
  .profile-stats  { gap: 1rem; }
  .form-card  { padding: 1.25rem; }
  .auth-card  { padding: 1.5rem; }
  .page-content { padding: 2rem 0 3.5rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .ticker-hero { padding: 2rem 1rem; }
  .event-detail__cover-wrap { height: 220px; }
  .tabs__nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs__tab { white-space: nowrap; flex-shrink: 0; }
  .profile-stats { flex-wrap: wrap; }
  .category-pills { gap: 0.35rem; }
  .event-detail__actions { gap: 0.5rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

/* ── Gamification ─────────────────────────────────────────────── */

/* XP level bar */
.xp-bar-wrap {
  background: var(--c-border);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.xp-bar { background: var(--c-primary); height: 100%; border-radius: 99px; transition: width 0.6s ease; }

.xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 0.2rem;
}

/* Streak badge */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  border-radius: 99px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.streak-badge--cold { background: var(--c-bg); border-color: var(--c-border); color: var(--c-text-muted); }

/* Level chip */
.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--c-primary-light);
  color: var(--c-primary);
  border-radius: 99px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Leaderboard */
.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.leaderboard-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
}
.leaderboard-item__rank {
  width: 1.4rem;
  font-weight: 700;
  color: var(--c-text-muted);
  flex-shrink: 0;
  text-align: center;
}
.leaderboard-item:first-child .leaderboard-item__rank { color: #F59E0B; }
.leaderboard-item:nth-child(2) .leaderboard-item__rank { color: #94A3B8; }
.leaderboard-item:nth-child(3) .leaderboard-item__rank { color: #CD7F32; }
.leaderboard-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
}
.leaderboard-item__name--user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.leaderboard-item__name:hover { color: var(--c-primary); }
.leaderboard-item__stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--c-text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.leaderboard-item__stat--xp { color: var(--c-primary); font-weight: 600; }
.leaderboard-empty { color: var(--c-text-muted); font-size: 0.875rem; }

/* ── Series ─────────────────────────────────────────────────────────────────── */
.series-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  gap: 0.75rem;
}
.series-nav__title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
}
.series-nav__title:hover { text-decoration: underline; }
.series-nav__arrows {
  display: flex;
  gap: 0.4rem;
}
.series-nav__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.series-nav__arrow:hover { background: var(--c-primary-light); color: var(--c-primary); border-color: var(--c-primary); }

/* Series dashboard grid */
.series-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.series-dashboard-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--c-card);
}
.series-dashboard-card__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(90deg, #FFF3E0, #FFF8F0);
  border-bottom: 1px solid #FFD59E;
  font-size: 0.78rem;
  font-weight: 700;
  color: #B45309;
  text-decoration: none;
  transition: background 0.15s;
}
.series-dashboard-card__header:hover { background: #FFE8B8; }
.series-dashboard-card__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.series-dashboard-card__count {
  flex-shrink: 0;
  font-weight: 600;
  opacity: 0.65;
  font-size: 0.72rem;
}
.series-dashboard-card__active {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  color: var(--c-text);
  font-size: 0.8rem;
  transition: background 0.15s;
}
.series-dashboard-card__active:hover { background: var(--c-bg); }
.series-dashboard-card__active-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-primary);
  background: var(--c-primary-light);
  padding: 0.1em 0.45em;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.series-dashboard-card__active-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Series page header */
.series-page-header {
  margin-bottom: 2rem;
}
.series-page-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.series-page-header__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}
.series-page-header__desc {
  color: var(--c-text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  max-width: 560px;
}
.series-page-header__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Series vertical timeline */
.series-timeline {
  margin-top: 0.5rem;
}
.series-tl-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.series-tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 0.25rem;
}
.series-tl-node {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--c-primary-light);
  z-index: 1;
}
.series-tl-node__num {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}
.series-tl-line {
  width: 2px;
  flex: 1;
  min-height: 1.5rem;
  background: linear-gradient(to bottom, var(--c-primary), var(--c-border));
  opacity: 0.5;
  margin: 0.25rem 0;
}
.series-tl-card {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.75rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--c-text);
  margin-bottom: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.series-tl-card:hover {
  border-color: var(--c-primary);
  box-shadow: 0 4px 16px rgba(99,102,241,.1);
  transform: translateY(-1px);
}
.series-tl-card__thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}
.series-tl-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.series-tl-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.series-tl-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.series-tl-card__title {
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.series-tl-card__date {
  font-size: 0.78rem;
  color: var(--c-text-muted);
}
.series-tl-card__ticker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.series-tl-card__ticker-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.series-tl-card__ticker-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-primary);
}

/* Empty state */
.series-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
  text-align: center;
}
.series-empty svg { opacity: 0.3; }
.series-empty p { margin: 0; font-size: 0.9rem; }

/* ── Streak widget ─────────────────────────────────────────────────────────── */
.streak-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #fff8f0, #fff3e5);
  border: 1.5px solid #f5c27a;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.streak-widget__flame { font-size: 1.75rem; line-height: 1; }
.streak-widget__body  { display: flex; align-items: baseline; gap: 0.35rem; }
.streak-widget__count { font-size: 1.6rem; font-weight: 800; color: #e8820c; line-height: 1; }
.streak-widget__label { font-size: 0.85rem; font-weight: 600; color: #b35c00; }
.streak-widget__best  { margin-left: auto; font-size: 0.8rem; color: var(--c-text-muted); }

/* ── Aftermath card ────────────────────────────────────────────────────────── */
.aftermath-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--c-primary-light);
  border: 1.5px solid var(--c-primary);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.aftermath-card__icon  { font-size: 1.6rem; }
.aftermath-card__title { font-weight: 700; font-size: 1rem; color: var(--c-primary); }
.aftermath-card__sub   { font-size: 0.82rem; color: var(--c-text-muted); margin-top: 0.1rem; }

/* ── Reactions ──────────────────────────────────────────────────────────────── */
.reactions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-card);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text-muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.reaction-btn:hover:not(:disabled) {
  border-color: var(--c-primary);
  color: var(--c-primary);
  transform: scale(1.08);
}
.reaction-btn--active {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
  color: var(--c-primary);
}
.reaction-btn:disabled { opacity: 0.55; cursor: default; }
.reaction-btn__emoji   { font-size: 1.1rem; line-height: 1; }
.reaction-btn__count   { font-size: 0.8rem; }

/* ── Time capsule ──────────────────────────────────────────────────────────── */
.capsule-section { margin: 1.5rem 0; }

.capsule-card {
  padding: 1.25rem 1.4rem;
  background: var(--c-accent-light);
  border: 1.5px solid var(--c-accent);
  border-radius: var(--radius);
}
.capsule-card__header {
  display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem;
}
.capsule-card__icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; margin-top: 0.1rem; }
.capsule-card__title { font-weight: 700; font-size: 1rem; color: var(--c-accent-hover); margin-bottom: 0.2rem; }
.capsule-card__hint  { font-size: 0.82rem; color: var(--c-text-muted); line-height: 1.4; }

.capsule-form { display: flex; flex-direction: column; gap: 0.75rem; }
.capsule-form__textarea {
  width: 100%; resize: vertical; min-height: 90px;
  border-color: var(--c-accent);
  background: var(--c-card);
}
.capsule-form__textarea:focus { border-color: var(--c-accent-hover); box-shadow: 0 0 0 3px rgba(255,201,77,0.2); }
.capsule-form__notice { font-size: 0.78rem; color: var(--c-text-muted); margin: 0; }
.capsule-form__footer { display: flex; align-items: center; justify-content: space-between; }
.capsule-form__counter { font-size: 0.78rem; color: var(--c-text-muted); }

.capsule-sealed {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: var(--c-accent-light); border: 1.5px dashed var(--c-accent); border-radius: var(--radius);
}
.capsule-sealed__icon { font-size: 1.4rem; flex-shrink: 0; }
.capsule-sealed__label { font-weight: 600; color: var(--c-accent-hover); font-size: 0.9rem; }
.capsule-sealed__hint  { font-size: 0.8rem; color: var(--c-text-muted); margin-top: 0.1rem; }

.capsule-reveal {
  padding: 1.1rem 1.25rem;
  background: var(--c-primary-light); border: 1.5px solid var(--c-primary); border-radius: var(--radius);
}
.capsule-reveal__header { font-weight: 700; font-size: 0.95rem; color: var(--c-primary-hover); margin-bottom: 0.6rem; }
.capsule-reveal__message { margin: 0 0 0.5rem; font-style: italic; color: var(--c-text); border-left: 3px solid var(--c-primary); padding-left: 0.75rem; }
.capsule-reveal__meta { font-size: 0.78rem; color: var(--c-text-muted); }

/* ── Badge pop overlay ─────────────────────────────────────────────────────── */
.badge-pop-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  animation: fadeIn .2s ease;
}
.badge-pop {
  background: var(--c-card); border-radius: var(--radius-md);
  padding: 2.5rem 2rem; text-align: center; max-width: 340px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn .3s cubic-bezier(0.34,1.56,0.64,1);
}
.badge-pop__icon  { font-size: 3.5rem; margin-bottom: 0.75rem; }
.badge-pop__title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.3rem; }
.badge-pop__sub   { font-size: 0.9rem; color: var(--c-text-muted); margin-bottom: 1.25rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Activity feed ─────────────────────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.feed-item {
  display: flex; gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--c-border);
}
.feed-item:last-child { border-bottom: none; }
.feed-item__avatar { flex-shrink: 0; }
.feed-item__body { flex: 1; min-width: 0; }
.feed-item__text { font-size: 0.875rem; color: var(--c-text-muted); margin-bottom: 0.4rem; line-height: 1.4; }
.feed-item__user { font-weight: 700; color: var(--c-text); }
.feed-item__card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--c-surface, var(--c-card)); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); text-decoration: none; color: inherit;
  transition: border-color 0.15s;
}
.feed-item__card:hover { border-color: var(--c-primary); }
.feed-item__thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.feed-item__card-title { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.1rem; }
.feed-item__card-date  { font-size: 0.77rem; color: var(--c-text-muted); }
.feed-item__quote {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.75rem;
  border-left: 3px solid var(--c-border);
  font-size: 0.85rem; color: var(--c-text-muted);
  font-style: italic;
}
.feed-item__ts { font-size: 0.75rem; color: var(--c-text-muted); margin-top: 0.4rem; }


/* ── Location autocomplete ─────────────────────────────────────────────────── */
.location-suggestions {
  list-style: none; margin: 0; padding: 0.3rem 0;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 300; max-height: 220px; overflow-y: auto;
}
.location-suggestions:empty { display: none; }
.location-suggestions__item {
  padding: 0.5rem 0.85rem; font-size: 0.875rem; cursor: pointer;
  transition: background 0.1s;
}
.location-suggestions__item:hover { background: var(--c-primary-light); }
.location-confirm {
  display: flex; align-items: center; gap: 0.35rem;
  margin-top: 0.3rem; font-size: 0.78rem; color: var(--c-primary);
}

/* ── Event location on detail page ────────────────────────────────────────── */
.event-location {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--c-text-muted);
  margin-top: 0.5rem;
}
.event-location svg { flex-shrink: 0; }
#event-map { height: 260px; border-radius: var(--radius); margin-top: 0.75rem; border: 1px solid var(--c-border); }
