:root {
  --bg: #fff8ef;
  --text: #1f2240;
  --muted: #5f6388;
  --panel: rgba(255, 255, 255, 0.86);
  --line: rgba(31, 34, 64, 0.12);
  --hot-pink: #ff4f8b;
  --sun: #ffb800;
  --teal: #0eb8a8;
  --sky: #4d8dff;
  --lime: #8bcf3d;
  --shadow: 0 20px 50px rgba(64, 53, 131, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 79, 139, 0.35), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(77, 141, 255, 0.28), transparent 28%),
    linear-gradient(160deg, #fff7e1 0%, #ebf8ff 48%, #f7ebff 100%);
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

.bg-shape-a {
  width: 230px;
  height: 230px;
  top: 66%;
  left: -70px;
  background: rgba(14, 184, 168, 0.3);
}

.bg-shape-b {
  width: 260px;
  height: 260px;
  right: -95px;
  top: 34%;
  background: rgba(255, 184, 0, 0.34);
}

.bg-shape-c {
  width: 170px;
  height: 170px;
  right: 20%;
  top: 73%;
  background: rgba(255, 79, 139, 0.24);
}

.page-shell {
  width: min(1140px, calc(100% - 1.8rem));
  margin: 0 auto;
  padding: 1.4rem 0 2.4rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.top-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.menu-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.menu-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 40, 90, 0.14);
}

.menu-link.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--sky), var(--teal));
}

.brand {
  font-family: "Baloo 2", sans-serif;
  font-size: 2rem;
  color: var(--text);
  text-decoration: none;
}

.stat-chip {
  background: linear-gradient(90deg, var(--sky), var(--teal));
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.header-user-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.28rem 0.6rem 0.28rem 0.28rem;
  max-width: min(240px, 44vw);
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(31, 34, 64, 0.2);
  object-fit: cover;
  background: linear-gradient(140deg, var(--hot-pink), var(--sun));
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.header-user-avatar:not([src])::before {
  content: attr(data-initial);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.header-user-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account-actions {
  margin-left: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.header-account-logged-out {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.header-account-link {
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.68rem;
  font-size: 0.76rem;
  font-weight: 800;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.header-account-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(30, 40, 90, 0.14);
}

.header-account-link.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--sky), var(--teal));
}

.hero h1,
.panel h2 {
  font-family: "Baloo 2", sans-serif;
  margin: 0;
}

.hero {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--teal);
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  line-height: 1;
}

.hero-text {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 65ch;
  line-height: 1.55;
}

.last-updated {
  margin: 0.5rem 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #4f5c92;
}

.dashboard,
.cards-area {
  display: grid;
  gap: 1rem;
}

.dashboard {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.cards-area {
  grid-template-columns: 1fr 1fr;
}

.week-calendar-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}

.week-calendar-panel {
  width: min(1080px, 100%);
}

.week-calendar-controls {
  margin: 0.45rem 0 0.85rem;
  display: grid;
  gap: 0.4rem;
  max-width: 320px;
  position: relative;
  z-index: 2;
}

.week-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.week-day-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.6rem;
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  animation: week-card-in 420ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--day-stagger, 0) * 65ms);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease,
    background-color 180ms ease;
}

.week-day-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 6px;
  width: 100%;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--sky), var(--teal), var(--hot-pink), var(--sun));
  opacity: 0.75;
  z-index: -1;
}

.week-day-card:hover {
  background-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(43, 59, 115, 0.16);
  border-color: rgba(31, 34, 64, 0.22);
}

.week-day-card.today {
  border-color: rgba(14, 184, 168, 0.75);
  box-shadow: 0 0 0 3px rgba(14, 184, 168, 0.24);
  animation: week-card-in 420ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards,
    today-pulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--day-stagger, 0) * 65ms), 420ms;
}

.week-day-card:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 2.1px, transparent 2.8px) 10px 12px /
      38px 38px repeat,
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 1.8px, transparent 2.5px) 22px 28px /
      44px 44px repeat,
    radial-gradient(circle, rgba(255, 184, 0, 0.8) 0 1.8px, transparent 2.6px) 30px 16px / 52px
      52px repeat,
    radial-gradient(circle, rgba(255, 79, 139, 0.72) 0 1.6px, transparent 2.4px) 16px 34px / 48px
      48px repeat;
  opacity: 0.78;
  pointer-events: none;
  animation: hover-sparkle 1.7s linear infinite;
}

.week-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem;
}

.week-day-name {
  margin: 0;
  font-weight: 800;
  font-size: 0.94rem;
}

.week-day-date {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.week-day-count {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: #3b5a83;
  transition: transform 140ms ease;
}

.week-day-card:hover .week-day-count {
  transform: translateX(2px);
}

.week-day-categories {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.week-day-category-chip {
  display: inline-block;
  font-size: 0.68rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f6f8ff;
  color: #3e4b78;
  font-weight: 700;
  transition: transform 120ms ease, background-color 120ms ease;
}

.week-day-category-chip:hover {
  transform: translateY(-1px);
  background: #edf2ff;
}

.week-day-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.week-day-event-link {
  color: #1f3f70;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  transition: color 140ms ease;
}

.week-day-event-link:hover {
  color: #0f2f59;
}

.week-day-expand {
  margin-top: 0.15rem;
}

.week-day-expand summary {
  list-style: none;
  cursor: pointer;
  color: #2c5f8e;
  font-size: 0.78rem;
  font-weight: 800;
}

.week-day-expand summary::after {
  content: " ▾";
  display: inline-block;
  transition: transform 140ms ease;
}

.week-day-expand[open] summary::after {
  transform: rotate(180deg);
}

.week-day-expand[open] summary {
  margin-bottom: 0.35rem;
}

.week-day-empty {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@keyframes week-card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes today-pulse {
  0% {
    box-shadow: 0 0 0 3px rgba(14, 184, 168, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(14, 184, 168, 0.28);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(14, 184, 168, 0.2);
  }
}

@keyframes today-ring {
  0% {
    transform: scale(0.98);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.04);
    opacity: 0.12;
  }
  100% {
    transform: scale(1.04);
    opacity: 0;
  }
}

@keyframes hover-sparkle {
  0% {
    background-position:
      10px 12px,
      22px 28px,
      30px 16px,
      16px 34px;
    opacity: 0.62;
  }
  50% {
    background-position:
      18px 4px,
      30px 20px,
      38px 8px,
      24px 26px;
    opacity: 0.95;
  }
  100% {
    background-position:
      26px -4px,
      38px 12px,
      46px 0,
      32px 18px;
    opacity: 0.68;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.score-grid > div {
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.6rem;
}

.score-label {
  font-size: 0.78rem;
  color: var(--muted);
  display: block;
}

.score-value {
  font-size: 1.35rem;
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.badge {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--hot-pink), var(--sun));
}

.filter-panel {
  display: grid;
  gap: 0;
  position: relative;
  z-index: 2;
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  text-align: left;
}

.filter-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.filter-panel.open .filter-chevron {
  transform: rotate(180deg);
}

.filter-body {
  display: grid;
  gap: 0.8rem;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding-top 0.3s ease;
  padding-top: 0;
}

.filter-panel.open .filter-body {
  max-height: 400px;
  padding-top: 0.8rem;
}

.filter-row {
  display: grid;
  gap: 0.3rem;
}

label {
  font-size: 0.88rem;
  font-weight: 800;
}

select {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  background: #fff;
  width: 100%;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.multi-select-trigger::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 10px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E") no-repeat center;
  display: inline-block;
}

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(68, 72, 141, 0.12);
}

.multi-select-dropdown.open {
  display: block;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.94rem;
}

.multi-select-option:hover {
  background: var(--bg);
}

.multi-select-option input[type="checkbox"] {
  accent-color: var(--hot-pink);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.swipe-help,
.panel-note {
  margin: 0.2rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.deck-filters {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.8rem;
}

.deck-filters label {
  font-size: 0.85rem;
  font-weight: 800;
}

.deck-filters select {
  width: 100%;
}

.deck-wrap {
  height: 560px;
  min-height: 560px;
  overflow: hidden;
}

.card-deck {
  position: relative;
  height: 100%;
}

.event-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 1.8rem 1.8rem 1.6rem;
  border: 1.5px solid rgba(31,34,64,0.1);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(64,53,131,0.12);
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  user-select: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

/* Shared result-card styles (mirrors serendipity.html) */
.result-source {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.result-title {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.8rem;
  letter-spacing: -0.3px;
}
.result-title a { color: inherit; text-decoration: none; }
.result-title a:hover { text-decoration: underline; }
.result-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.result-pill { font-size: 0.75rem; font-weight: 800; padding: 0.28rem 0.7rem; border-radius: 999px; }
.pill-category { background: #ffe0ee; color: var(--hot-pink); }
.pill-cost { background: rgba(31,34,64,0.07); color: var(--muted); }
.result-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1.2rem;
}
.result-meta span { display: flex; align-items: baseline; gap: 0.4rem; }
.result-meta .meta-icon { font-size: 0.9rem; }
.result-why {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 1rem;
}
.result-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: auto; padding-top: 1rem; }
.btn-attend {
  background: linear-gradient(90deg, var(--hot-pink), var(--sky));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-family: "Nunito", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.18s, transform 0.14s;
}
.btn-attend:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-next {
  background: rgba(31,34,64,0.06);
  color: var(--text);
  border: 1.5px solid rgba(31,34,64,0.12);
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-family: "Nunito", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.btn-next:hover { background: rgba(31,34,64,0.1); border-color: rgba(31,34,64,0.2); }

/* Axis bars (shared with serendipity) */
.axis-section { margin-bottom: 1rem; padding-top: 0.7rem; border-top: 1px solid rgba(31,34,64,0.07); }
.axis-section-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); opacity: 0.65; margin-bottom: 0.45rem; }
.axis-bars { display: flex; flex-direction: column; gap: 0.26rem; }
.axis-row { display: flex; align-items: center; gap: 0.45rem; }
.axis-label { font-size: 0.63rem; font-weight: 700; color: var(--muted); width: 56px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.axis-track { flex: 1; height: 3px; background: rgba(31,34,64,0.08); border-radius: 999px; overflow: hidden; }
.axis-fill { height: 100%; width: 0; border-radius: 999px; transition: width 0.7s ease; }
.axis-val { font-size: 0.62rem; font-weight: 800; color: var(--muted); width: 14px; text-align: right; flex-shrink: 0; }

/* Dark theme overrides */
.card-dark .result-source { opacity: 0.45; color: #fff; }
.card-dark .result-title a { color: #fff; }
.card-dark .result-meta { color: rgba(255,255,255,0.45) !important; }
.card-dark .result-desc { color: rgba(255,255,255,0.65) !important; }
.card-dark .result-why { color: rgba(255,255,255,0.4) !important; }
.card-dark .axis-section { border-top-color: rgba(255,255,255,0.1); }
.card-dark .axis-section-label { color: rgba(255,255,255,0.35); opacity: 1; }
.card-dark .axis-label { color: rgba(255,255,255,0.4); }
.card-dark .axis-track { background: rgba(255,255,255,0.1); }
.card-dark .axis-val { color: rgba(255,255,255,0.4); }
.card-dark .btn-next { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); }
.card-dark .btn-next:hover { background: rgba(255,255,255,0.16); }

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.pill {
  background: #edf0ff;
  border-radius: 999px;
  font-size: 0.76rem;
  padding: 0.3rem 0.55rem;
  font-weight: 800;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eef6ff;
}

.category-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--sky);
  display: inline-block;
}

.category-music .category-dot {
  background: var(--hot-pink);
}

.category-arts .category-dot {
  background: var(--sun);
}

.category-outdoors .category-dot {
  background: var(--lime);
}

.category-cultural .category-dot {
  background: var(--sky);
}

.category-networking .category-dot {
  background: #3b82f6;
}

.pill.cost-Free {
  background: #dcffd7;
}

.pill.cost-Budget {
  background: #fff3cc;
}

.pill.cost-Moderate {
  background: #ffe0c9;
}

.pill.cost-Premium {
  background: #ffd9ea;
}


/* Score-driven card themes */
.event-card.card-electric { background: linear-gradient(160deg, #0d2816 0%, #0f3320 100%) !important; border-color: transparent !important; box-shadow: 0 16px 48px rgba(0,0,0,0.45) !important; color: #fff !important; }
.event-card.card-intimate { background: linear-gradient(160deg, #1e1004 0%, #291508 100%) !important; border-color: transparent !important; box-shadow: 0 16px 48px rgba(0,0,0,0.45) !important; color: #fff !important; }
.event-card.card-formal   { background: linear-gradient(160deg, #0c1525 0%, #0f1e36 100%) !important; border-color: transparent !important; box-shadow: 0 16px 48px rgba(0,0,0,0.45) !important; color: #fff !important; }
.event-card.card-dark h3 a { color: #fff; }
.event-card.card-dark p,
.event-card.card-dark .event-meta { color: rgba(255,255,255,0.5) !important; }
.event-card.card-dark .event-source { color: rgba(255,255,255,0.3) !important; }
.event-card.card-dark .event-source a { color: rgba(255,255,255,0.45) !important; }

/* Score pills */
.score-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; }
.score-pill { font-size: 0.66rem; font-weight: 800; padding: 0.2rem 0.55rem; border-radius: 999px; letter-spacing: 0.03em; white-space: nowrap; }

/* Axis bars (inside swipe cards) */
.card-axis-section { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid rgba(31,34,64,0.07); }
.card-dark .card-axis-section { border-top-color: rgba(255,255,255,0.1); }
.card-axis-bars { display: flex; flex-direction: column; gap: 0.22rem; }
.card-axis-row { display: flex; align-items: center; gap: 0.4rem; }
.card-axis-label { font-size: 0.6rem; font-weight: 700; color: var(--muted); width: 52px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.card-dark .card-axis-label { color: rgba(255,255,255,0.35); }
.card-axis-track { flex: 1; height: 3px; background: rgba(31,34,64,0.08); border-radius: 999px; overflow: hidden; }
.card-dark .card-axis-track { background: rgba(255,255,255,0.1); }
.card-axis-fill { height: 100%; width: 0; border-radius: 999px; transition: width 0.7s ease; }
.card-axis-val { font-size: 0.6rem; font-weight: 800; color: var(--muted); width: 14px; text-align: right; flex-shrink: 0; }
.card-dark .card-axis-val { color: rgba(255,255,255,0.35); }

.card-source {
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
  margin-bottom: 0.3rem;
}
.card-dark .card-source { color: rgba(255,255,255,0.35); }

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 0.5rem;
}
.card-dark .card-meta { color: rgba(255,255,255,0.45); }

.card-vibe-line {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.2rem;
}
.card-dark .card-vibe-line { color: rgba(255,255,255,0.35); }

.card-axis-section-header {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 0.4rem;
}
.card-dark .card-axis-section-header { color: rgba(255,255,255,0.3); opacity: 1; }

.card-inline-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-shrink: 0;
}
.card-cta-btn {
  flex: 1;
  background: linear-gradient(90deg, var(--hot-pink), var(--sky));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s;
}
.card-cta-btn:hover { opacity: 0.88; }
.card-skip-btn {
  background: rgba(31,34,64,0.07);
  border: 1px solid rgba(31,34,64,0.12);
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s;
}
.card-skip-btn:hover { background: rgba(31,34,64,0.13); }
.card-dark .card-skip-btn { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.65); }
.card-dark .card-skip-btn:hover { background: rgba(255,255,255,0.16); }

/* ── Swipe stamps ── */
.stamp {
  position: absolute;
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  border: 3px solid;
  z-index: 10;
  transition: opacity 0.1s;
}
.stamp-skip    { top: 24px; left: 24px;  color: #fb7185; border-color: #fb7185; transform: rotate(-12deg); }
.stamp-reserve { top: 24px; right: 24px; color: #2dd4bf; border-color: #2dd4bf; transform: rotate(12deg);  }

/* Button-hover tilt reveals stamp */
.event-card.tilt-left  { transform: rotate(-5deg) translateX(-8px) !important; transition: transform 0.2s ease !important; }
.event-card.tilt-right { transform: rotate( 5deg) translateX( 8px) !important; transition: transform 0.2s ease !important; }
.event-card.tilt-left  .stamp-skip    { opacity: 1; }
.event-card.tilt-right .stamp-reserve { opacity: 1; }

/* Fly-off keyframes */
@keyframes flyLeft  { to { transform: rotate(-22deg) translateX(-160%) translateY(-20px); opacity: 0; } }
@keyframes flyRight { to { transform: rotate( 22deg) translateX( 160%) translateY(-20px); opacity: 0; } }
.event-card.fly-left  { animation: flyLeft  0.32s ease-in forwards !important; }
.event-card.fly-right { animation: flyRight 0.32s ease-in forwards !important; }

.actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.9rem;
  position: relative;
  z-index: 3;
}

.action-btn {
  flex: 1;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-pass {
  background: #ffe5ec;
  color: #9d3256;
}

.action-like {
  background: linear-gradient(90deg, var(--teal), var(--sky));
  color: #fff;
}

.saved-events {
  display: grid;
  gap: 0.75rem;
}

.saved-toggle {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 0.75rem;
}

.saved-controls {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.saved-search-input {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
  background: #fff;
}

.saved-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.8rem;
}

.saved-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.saved-card h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.saved-group-heading {
  margin: 0.2rem 0 0.1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #42607d;
}

.saved-meta {
  margin: 0.25rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.saved-details {
  margin: 0 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  background: #fcfdff;
}

.saved-details summary {
  cursor: pointer;
  font-weight: 800;
  color: #20486d;
  font-size: 0.84rem;
}

.saved-details p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.saved-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tiny-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.tiny-btn:hover {
  box-shadow: 0 6px 14px rgba(30, 40, 90, 0.15);
  transform: translateY(-1px);
}

.tiny-btn.action-like {
  background: linear-gradient(90deg, var(--teal), var(--sky));
  color: #fff;
  border-color: transparent;
}

.tiny-btn.action-pass {
  background: #ffe5ec;
  color: #9d3256;
  border-color: rgba(157, 50, 86, 0.2);
}

.tiny-btn.calendar {
  border-color: rgba(14, 184, 168, 0.45);
  color: #067f74;
}

.tiny-btn.active-up {
  background: #dcffd7;
}

.tiny-btn.active-down {
  background: #ffe2e4;
}

.saved-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.saved-page-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.auth-panel {
  max-width: min(50%, 520px);
  width: 100%;
  margin: 0 auto 1rem;
}

.auth-panel-head h2 {
  margin: 0;
}

.auth-forms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.auth-mode-toggle {
  display: inline-flex;
  gap: 0.4rem;
}

.auth-mode-btn {
  background: #fff;
}

.auth-mode-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--sky), var(--teal));
}

.auth-form {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.8rem;
  display: grid;
  gap: 0.35rem;
}

.auth-form h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="file"] {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  background: #fff;
}

.auth-btn {
  width: fit-content;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, var(--sky), var(--teal));
  color: #fff;
  border-color: transparent;
}

.auth-message {
  margin: 0.15rem 0 0.7rem;
  min-height: 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-message.error {
  color: #9d3256;
}

.auth-message.success {
  color: #067f74;
}

.password-rules {
  margin: 0.2rem 0 0.45rem;
  padding-left: 1rem;
  display: grid;
  gap: 0.12rem;
  color: #7c5f75;
  font-size: 0.78rem;
  font-weight: 700;
}

.password-rules li.met {
  color: #0f8d6a;
}

.auth-logged-in {
  display: grid;
  gap: 0.8rem;
}

.auth-logged-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.auth-welcome {
  margin: 0;
  font-weight: 800;
}

.auth-account-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-form {
  max-width: 440px;
}

.auth-photo-preview {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f5f7ff;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  height: 100%;
  display: grid;
  place-items: center;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 30, 54, 0.55);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: min(560px, calc(100% - 2rem));
  background: #fff;
  border-radius: 20px;
  padding: 1.4rem;
  padding-top: 2.8rem;
  box-shadow: 0 24px 60px rgba(32, 40, 90, 0.25);
  z-index: 1;
}

.modal-content h3 {
  font-family: "Baloo 2", sans-serif;
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--text);
}

.modal-title {
  padding-right: 2.6rem;
}

.modal-meta {
  font-weight: 800;
  color: var(--muted);
}

.modal-when,
.modal-where,
.modal-desc {
  color: var(--muted);
}

.modal-when,
.modal-where {
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border: 0;
  background: #f3f5ff;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
}

.modal-meta,
.modal-when,
.modal-where,
.modal-desc {
  margin: 0.45rem 0;
  color: var(--muted);
}

.modal-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.page-game-board .hero,
body.page-game-board .filter-panel,
body.page-game-board .saved-panel,
body.page-game-board .week-calendar-wrap {
  display: none;
}

body.page-game-board .cards-area {
  grid-template-columns: 1fr;
}

body.page-game-board .dashboard {
  grid-template-columns: 1fr;
}

body.page-reserved-plans .dashboard,
body.page-reserved-plans .swipe-panel,
body.page-reserved-plans .week-calendar-wrap {
  display: none;
}

body.page-reserved-plans .cards-area {
  grid-template-columns: 1fr;
}

body.page-weekly-compass .dashboard,
body.page-weekly-compass .cards-area {
  display: none;
}

body.page-account-access #lastUpdated,
body.page-account-access .dashboard,
body.page-account-access .cards-area,
body.page-account-access .week-calendar-wrap {
  display: none;
}

@media (max-width: 960px) {
  .site-header {
    flex-wrap: wrap;
  }

  .header-user-chip {
    margin-left: 0;
  }

  .header-account-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .week-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard,
  .cards-area {
    grid-template-columns: 1fr;
  }

  .saved-controls {
    grid-template-columns: 1fr;
  }

  .deck-wrap {
    height: 520px;
    min-height: 520px;
  }
}
