:root {
  color-scheme: dark;
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --bg: #080c11;
  --app-bg: rgba(8, 12, 17, 0.74);
  --surface: #111922;
  --surface-2: #161f2a;
  --surface-3: #1b2632;
  --card: #101820;
  --card-hover: #14202b;
  --topbar-bg: rgba(8, 12, 17, 0.84);
  --nav-bg: rgba(16, 24, 33, 0.9);
  --sheet-bg: #0e151d;

  --text: #f5f2e9;
  --text-2: #aab4c0;
  --text-3: #74808e;
  --muted: #5d6876;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --hover: rgba(255, 255, 255, 0.055);

  --accent: #d9ff6a;
  --accent-soft: rgba(217, 255, 106, 0.12);
  --accent-ink: #111609;
  --cta: #f4f0e5;
  --cta-text: #101419;
  --danger: #ff7676;
  --danger-soft: rgba(255, 94, 94, 0.12);
  --amber: #ffbd66;
  --amber-soft: rgba(255, 170, 60, 0.12);
  --green: #6fe4a3;
  --green-soft: rgba(91, 223, 151, 0.12);

  --ride: #ff9f43;
  --ride-soft: rgba(255, 159, 67, 0.12);
  --run: #35c8b4;
  --run-soft: rgba(53, 200, 180, 0.12);
  --other: #eb6aa9;
  --other-soft: rgba(235, 106, 169, 0.12);
  --tab-all: #18222c;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.5);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3eee5;
  --app-bg: rgba(247, 243, 235, 0.86);
  --surface: #fffdf8;
  --surface-2: #f5f0e7;
  --surface-3: #eee7db;
  --card: #fffdf9;
  --card-hover: #fffaf0;
  --topbar-bg: rgba(247, 243, 235, 0.86);
  --nav-bg: rgba(255, 253, 248, 0.91);
  --sheet-bg: #fffdf8;

  --text: #171b20;
  --text-2: #56606b;
  --text-3: #7c858f;
  --muted: #9199a1;
  --border: rgba(25, 30, 36, 0.1);
  --border-strong: rgba(25, 30, 36, 0.2);
  --hover: rgba(25, 30, 36, 0.05);

  --accent: #11775a;
  --accent-soft: rgba(17, 119, 90, 0.1);
  --accent-ink: #f7fffb;
  --cta: #151a20;
  --cta-text: #f8f4e9;
  --danger: #c63e3e;
  --danger-soft: rgba(198, 62, 62, 0.09);
  --amber: #a86409;
  --amber-soft: rgba(168, 100, 9, 0.1);
  --green: #167449;
  --green-soft: rgba(22, 116, 73, 0.1);
  --tab-all: #e9e2d5;

  --shadow-sm: 0 4px 14px rgba(50, 43, 28, 0.07);
  --shadow-md: 0 18px 40px rgba(50, 43, 28, 0.12);
  --shadow-lg: 0 28px 90px rgba(50, 43, 28, 0.22);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --bg: #f3eee5;
    --app-bg: rgba(247, 243, 235, 0.86);
    --surface: #fffdf8;
    --surface-2: #f5f0e7;
    --surface-3: #eee7db;
    --card: #fffdf9;
    --card-hover: #fffaf0;
    --topbar-bg: rgba(247, 243, 235, 0.86);
    --nav-bg: rgba(255, 253, 248, 0.91);
    --sheet-bg: #fffdf8;

    --text: #171b20;
    --text-2: #56606b;
    --text-3: #7c858f;
    --muted: #9199a1;
    --border: rgba(25, 30, 36, 0.1);
    --border-strong: rgba(25, 30, 36, 0.2);
    --hover: rgba(25, 30, 36, 0.05);

    --accent: #11775a;
    --accent-soft: rgba(17, 119, 90, 0.1);
    --accent-ink: #f7fffb;
    --cta: #151a20;
    --cta-text: #f8f4e9;
    --danger: #c63e3e;
    --danger-soft: rgba(198, 62, 62, 0.09);
    --amber: #a86409;
    --amber-soft: rgba(168, 100, 9, 0.1);
    --green: #167449;
    --green-soft: rgba(22, 116, 73, 0.1);
    --tab-all: #e9e2d5;

    --shadow-sm: 0 4px 14px rgba(50, 43, 28, 0.07);
    --shadow-md: 0 18px 40px rgba(50, 43, 28, 0.12);
    --shadow-lg: 0 28px 90px rgba(50, 43, 28, 0.22);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

body.sheet-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ambient background */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.18;
}

.ambient-orb--one {
  width: 55vw;
  height: 55vw;
  max-width: 520px;
  max-height: 520px;
  top: -16%;
  left: -18%;
  background: #f08a2f;
}

.ambient-orb--two {
  width: 60vw;
  height: 60vw;
  max-width: 620px;
  max-height: 620px;
  right: -26%;
  bottom: -14%;
  background: #13a58e;
  opacity: 0.15;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 0%, transparent 75%);
}

:root[data-theme="light"] .ambient-orb {
  opacity: 0.2;
}

:root[data-theme="light"] .ambient-grid {
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(20, 25, 30, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 25, 30, 0.045) 1px, transparent 1px);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .ambient-orb {
    opacity: 0.2;
  }
  :root[data-theme="auto"] .ambient-grid {
    opacity: 0.35;
    background-image:
      linear-gradient(rgba(20, 25, 30, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(20, 25, 30, 0.045) 1px, transparent 1px);
  }
}

/* Boot screen */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.boot-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.boot-logo {
  width: 72px;
  height: 72px;
  padding: 17px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 22px;
  background: var(--cta);
  box-shadow: var(--shadow-md);
}

.boot-logo span {
  display: block;
  height: 6px;
  border-radius: 4px;
  transform-origin: left;
  animation: boot-bars 1.25s ease-in-out infinite;
}

.boot-logo span:nth-child(1) {
  width: 44px;
  background: var(--ride);
}
.boot-logo span:nth-child(2) {
  width: 32px;
  background: var(--run);
  animation-delay: 0.12s;
}
.boot-logo span:nth-child(3) {
  width: 38px;
  background: var(--other);
  animation-delay: 0.24s;
}

.boot-copy {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.boot-copy strong {
  font-size: 27px;
  letter-spacing: -0.045em;
}

.boot-copy span {
  color: var(--text-3);
  font-size: 13px;
}

.boot-progress {
  width: 120px;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
}

.boot-progress i {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: boot-load 1.1s ease-in-out infinite;
}

@keyframes boot-bars {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.62);
  }
}

@keyframes boot-load {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(270%);
  }
}

/* App shell */

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--app-bg);
}

@media (min-width: 760px) {
  .app-shell {
    border-inline: 1px solid var(--border);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px;
  background: var(--topbar-bg);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 9px;
  border-radius: 13px;
  background: var(--cta);
  box-shadow: var(--shadow-sm);
}

.logo-mark span {
  display: block;
  height: 4px;
  border-radius: 3px;
}

.logo-mark span:nth-child(1) {
  width: 23px;
  background: var(--ride);
}
.logo-mark span:nth-child(2) {
  width: 16px;
  background: var(--run);
}
.logo-mark span:nth-child(3) {
  width: 20px;
  background: var(--other);
}

.brand-copy {
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-title-row h1 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.brand-chip {
  padding: 3px 6px 2px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

#brand-subtitle {
  margin-top: 4px;
  max-width: 220px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-button:active {
  transform: scale(0.95);
}

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.icon-button--accent {
  border-color: transparent;
  background: var(--cta);
  color: var(--cta-text);
}

.icon-button--accent:hover {
  background: var(--cta);
  color: var(--cta-text);
  opacity: 0.88;
}

/* Main / views */

.main {
  padding: 10px 16px calc(118px + var(--safe-bottom));
  outline: none;
}

.view {
  animation: view-in 0.26s ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  display: block;
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 14px;
}

.page-head h2 {
  margin-top: 4px;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.page-head .head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Category tabs */

.filter-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 4px 0 2px;
}

.type-tab {
  position: relative;
  min-width: 0;
  height: 72px;
  padding: 9px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.type-tab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), transparent 46%);
  pointer-events: none;
}

.type-tab--all {
  background: var(--tab-all);
  border-color: var(--border);
}

.type-tab--ride {
  background: linear-gradient(145deg, #ffbf72 0%, #f39232 100%);
  color: #281505;
}

.type-tab--run {
  background: linear-gradient(145deg, #80efdb 0%, #25bda7 100%);
  color: #041916;
}

.type-tab--other {
  background: linear-gradient(145deg, #ffa3d2 0%, #df4f93 100%);
  color: #2a0918;
}

.type-tab.is-muted {
  opacity: 0.8;
}

.type-tab:hover {
  opacity: 0.92;
}

.type-tab.is-active {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.6),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.type-tab--all.is-active {
  box-shadow:
    inset 0 0 0 1.5px var(--border-strong),
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.type-tab-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.type-tab-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.14);
}

.type-tab--all .type-tab-icon {
  background: var(--hover);
}

.type-tab-icon .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.type-tab-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.type-tab--all .type-tab-count {
  background: var(--hover);
  color: var(--text-2);
}

.type-tab-label {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Board */

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 2px 5px;
}

.board-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.board-kicker b {
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid var(--green);
  opacity: 0;
  animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.month-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 6px 0 10px;
  border-radius: 10px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 650;
  text-transform: capitalize;
  transition: background 0.16s ease, color 0.16s ease;
}

.month-link:hover {
  background: var(--hover);
  color: var(--text);
}

.month-link .icon {
  width: 15px;
  height: 15px;
}

.day-group {
  margin-top: 15px;
}

.day-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 31px;
  padding: 0 2px;
}

.date-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: none;
}

.date-block b {
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.date-block span {
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: lowercase;
}

.day-name {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.day-name strong {
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
  text-transform: capitalize;
}

.day-name span {
  color: var(--text-3);
  font-size: 9.5px;
}

.day-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.day-count {
  flex: none;
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.event-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.event-card {
  position: relative;
  width: 100%;
  min-height: 82px;
  padding: 12px 11px 12px 15px;
  display: grid;
  grid-template-columns: 39px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.032), transparent 44%),
    var(--card);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.event-card[data-type="ride"] {
  --type-color: var(--ride);
  --type-soft: var(--ride-soft);
}
.event-card[data-type="run"] {
  --type-color: var(--run);
  --type-soft: var(--run-soft);
}
.event-card[data-type="other"] {
  --type-color: var(--other);
  --type-soft: var(--other-soft);
}

.event-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  bottom: 17px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--type-color);
  box-shadow: 0 0 18px var(--type-soft);
}

.event-card:hover {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 46%),
    var(--card-hover);
  border-color: var(--border-strong);
}

.event-card:active {
  transform: scale(0.995);
}

.event-time {
  display: grid;
  gap: 1px;
  align-self: center;
  min-width: 0;
}

.event-time strong {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.event-time span {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.event-glyph {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--type-soft);
  color: var(--type-color);
}

.event-glyph .icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.event-body {
  min-width: 0;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.2;
}

.event-meta .type-label {
  flex: none;
  color: var(--type-color);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.meta-dot {
  width: 2px;
  height: 2px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.event-author {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.event-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  min-width: 0;
}

.event-title-row h3 {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.event-title-row .icon {
  width: 12px;
  height: 12px;
  flex: none;
  color: var(--text-3);
  opacity: 0.8;
}

.event-title-row a {
  display: inline-flex;
  align-items: center;
  color: var(--text-3);
  transition: color 0.15s ease;
}

.event-title-row a:hover {
  color: var(--text);
}

.event-note .icon {
  width: 11px;
  height: 11px;
  flex: none;
}

.event-schedule {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 5px;
  margin-top: 4px;
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.35;
}

.schedule-inline-item {
  white-space: nowrap;
}

.schedule-inline-item b {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.schedule-inline-item.is-main b {
  color: var(--type-color, var(--accent));
}

.schedule-sep {
  color: var(--muted);
}

.schedule-rest {
  color: var(--text-3);
}

.status-chip {
  white-space: nowrap;
}

.event-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--amber);
  font-size: 9.5px;
  font-weight: 550;
  line-height: 1.2;
}

.event-note--danger {
  color: var(--danger);
}

.event-note s {
  opacity: 0.75;
}

.rsvp-pill {
  min-width: 45px;
  height: 39px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease,
    transform 0.12s ease;
}

.rsvp-pill .icon {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

.rsvp-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.rsvp-pill:active {
  transform: scale(0.94);
}

.rsvp-pill.is-on {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}

.rsvp-pill.is-on .icon {
  opacity: 1;
}

.rsvp-pill:disabled {
  opacity: 0.4;
  cursor: default;
}

.event-card.is-cancelled {
  opacity: 0.66;
  background: var(--card);
}

.event-card.is-cancelled .event-title-row h3,
.event-card.is-cancelled .event-time strong {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.event-card.is-cancelled::before {
  background: var(--danger);
  box-shadow: none;
}

.event-card.is-cancelled .event-glyph {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  padding: 40px 22px;
  display: grid;
  justify-items: center;
  gap: 9px;
  border: 1px dashed var(--border-strong);
  border-radius: 20px;
  text-align: center;
}

.empty-glyph {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border-radius: 17px;
  background: var(--surface-2);
  color: var(--text-3);
}

.empty-glyph .icon {
  width: 24px;
  height: 24px;
}

.empty-state strong {
  font-size: 15px;
}

.empty-state p {
  max-width: 290px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.45;
}

.empty-state .btn {
  margin-top: 6px;
}

.list-loader {
  display: grid;
  gap: 8px;
}

/* Skeleton */

.skeleton {
  border-radius: 16px;
  background: linear-gradient(
    100deg,
    var(--surface) 20%,
    var(--surface-2) 38%,
    var(--surface) 56%
  );
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
}

.skeleton--title {
  width: 58%;
  height: 34px;
  margin: 18px 2px 16px;
}
.skeleton--tabs {
  height: 72px;
  margin-bottom: 20px;
}
.skeleton--card {
  height: 82px;
  margin-bottom: 9px;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* Bottom navigation */

.bottom-nav {
  position: fixed;
  z-index: 44;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  width: min(calc(100% - 24px), 596px);
  height: 64px;
  padding: 5px;
  display: flex;
  align-items: stretch;
  gap: 2px;
  transform: translateX(-50%);
  border-radius: 19px;
  border: 1px solid var(--border);
  background: var(--nav-bg);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

.nav-item {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  color: var(--text-3);
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
  transition: transform 0.16s ease;
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-item:hover {
  color: var(--text-2);
}

.nav-item.is-active {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.is-active .icon {
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-badge {
  position: absolute;
  top: 9px;
  left: calc(50% + 7px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
}

/* Generic buttons */

.btn {
  height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: transform 0.13s ease, background 0.16s ease, border-color 0.16s ease,
    opacity 0.16s ease;
  white-space: nowrap;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn--primary {
  background: var(--cta);
  color: var(--cta-text);
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--ghost {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.btn--danger {
  border-color: rgba(255, 118, 118, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--quiet {
  background: transparent;
  color: var(--text-2);
}

.btn--quiet:hover {
  background: var(--hover);
  color: var(--text);
}

.btn--sm {
  height: 35px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 11px;
}

.btn--sm .icon {
  width: 14px;
  height: 14px;
}

.btn--block {
  width: 100%;
}

.btn--grow {
  flex: 1;
}

.icon-btn-sm {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}

.icon-btn-sm .icon {
  width: 16px;
  height: 16px;
}

.icon-btn-sm:hover {
  color: var(--text);
}

/* Calendar */

.calendar-wrap {
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.03), transparent 44%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 13px 12px 12px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 2px 12px;
}

.calendar-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-transform: capitalize;
}

.calendar-title strong {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.calendar-title span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}

.calendar-nav {
  display: flex;
  gap: 5px;
}

.calendar-nav .icon-btn-sm {
  width: 31px;
  height: 31px;
}

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

.weekdays {
  padding-bottom: 5px;
}

.weekdays span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-grid {
  gap: 2px;
}

.cal-day {
  position: relative;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 11px;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, color 0.15s ease;
}

.cal-day:hover {
  background: var(--hover);
}

.cal-day.is-today::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-day.is-selected {
  background: var(--cta);
  color: var(--cta-text);
}

.cal-day.is-selected::after {
  background: var(--ride);
}

.cal-day.is-empty {
  pointer-events: none;
}

.cal-dots {
  height: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.cal-dots i {
  display: block;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--dot-color, var(--text-3));
}

.cal-dots i.is-cancelled {
  opacity: 0.35;
  box-shadow: inset 0 0 0 1px var(--dot-color);
  background: transparent;
}

.cal-day.is-selected .cal-dots i {
  background: var(--dot-color);
}

.calendar-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  padding: 12px 4px 2px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 600;
}

.legend-item i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--legend-color);
}

.agenda-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 2px 8px;
}

.agenda-head h3 {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.agenda-head .day-label {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 550;
}

/* Moderation */

.mod-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.mod-tab {
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 650;
  transition: background 0.16s ease, color 0.16s ease;
}

.mod-tab b {
  min-width: 16px;
  height: 15px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--hover);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.mod-tab.is-active {
  background: var(--surface-2);
  color: var(--text);
}

.mod-tab.is-active b {
  background: var(--danger-soft);
  color: var(--danger);
}

.mod-body {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.mod-card {
  position: relative;
  padding: 14px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.mod-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--item-color, var(--accent));
}

.mod-card[data-type="ride"] {
  --item-color: var(--ride);
  --item-soft: var(--ride-soft);
}
.mod-card[data-type="run"] {
  --item-color: var(--run);
  --item-soft: var(--run-soft);
}
.mod-card[data-type="other"] {
  --item-color: var(--other);
  --item-soft: var(--other-soft);
}

.mod-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--item-color);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mod-card-head .time {
  margin-left: auto;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0;
}

.mod-card h4 {
  margin-top: 7px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.mod-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  color: var(--text-3);
  font-size: 10px;
}

.mod-desc {
  margin-top: 7px;
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 9.5px;
}

.mod-link span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mod-link .icon {
  width: 12px;
  height: 12px;
  flex: none;
}

.mod-actions {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}

.mod-actions .btn {
  flex: 1;
}

.report-card {
  border-color: rgba(255, 118, 118, 0.18);
}

.report-card::before {
  background: var(--danger);
}

.report-reason {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9.5px;
  font-weight: 700;
}

.report-comment {
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.4;
}

.report-event {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  font-size: 10px;
}

.report-event strong {
  color: var(--text-2);
  font-weight: 650;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.banned-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
}

.avatar {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(145deg, hsla(var(--av-hue, 30), 80%, 62%, 0.95), hsla(calc(var(--av-hue, 30) + 38), 70%, 44%, 0.9));
  color: #12100b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.banned-row .who {
  min-width: 0;
  flex: 1;
}

.banned-row strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.banned-row span {
  display: block;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 9.5px;
}

/* Profile */

.profile-hero {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255, 159, 67, 0.17), transparent 55%),
    radial-gradient(100% 120% at 0% 100%, rgba(53, 200, 180, 0.12), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background:
    linear-gradient(145deg, #ffb15c, #f07c25 54%, #d94a85);
  color: #231206;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.profile-name {
  min-width: 0;
  flex: 1;
}

.profile-name h2 {
  overflow: hidden;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-name p {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role-chip--member {
  background: var(--surface-2);
  color: var(--text-3);
}

.profile-edit {
  position: absolute;
  top: 14px;
  right: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 16px;
}

.stat-tile {
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
}

.stat-tile b {
  display: block;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-tile span {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 550;
}

.panel {
  margin-top: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 15px 9px;
}

.panel-head h3 {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.panel-head .panel-action {
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 600;
}

.panel-head .panel-action:hover {
  color: var(--text);
}

.panel-body {
  padding: 0 12px 12px;
}

.setting-row {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.setting-row:first-child {
  border-top: 0;
}

.setting-icon {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-2);
}

.setting-icon .icon {
  width: 15px;
  height: 15px;
}

.setting-copy {
  min-width: 0;
  flex: 1;
}

.setting-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
}

.setting-copy span {
  display: block;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 9.5px;
}

.setting-row > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.my-event-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 4px;
  border-top: 1px solid var(--border);
  width: 100%;
  text-align: left;
}

.my-event-row:first-child {
  border-top: 0;
}

.my-event-date {
  width: 34px;
  flex: none;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.my-event-date b {
  display: block;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.my-event-copy {
  min-width: 0;
  flex: 1;
}

.my-event-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.my-event-copy span {
  display: block;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 9px;
}

.status-chip {
  flex: none;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-chip--pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.status-chip--rejected {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-chip--cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-chip--published {
  background: var(--green-soft);
  color: var(--green);
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
}

.segmented button {
  height: 27px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 650;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.switch {
  position: relative;
  width: 38px;
  height: 23px;
  flex: none;
  border-radius: 999px;
  background: var(--surface-3);
  transition: background 0.18s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch.is-on {
  background: var(--accent);
}

.switch.is-on::after {
  transform: translateX(15px);
  background: var(--accent-ink);
}

.profile-footer {
  padding: 18px 4px 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.profile-footer a {
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Sheets */

.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 9, 0.64);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in 0.2s ease both;
}

.sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  max-height: min(92dvh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 26px 26px 0 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: var(--sheet-bg);
  box-shadow: var(--shadow-lg);
  animation: sheet-up 0.28s cubic-bezier(0.22, 0.8, 0.28, 1) both;
  overflow: hidden;
}

.sheet-panel.is-closing {
  animation: sheet-down 0.2s ease both;
}

.sheet-grabber {
  width: 38px;
  height: 4px;
  flex: none;
  margin: 8px auto 1px;
  border-radius: 999px;
  background: var(--border-strong);
}

.sheet-header {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 18px 11px;
}

.sheet-heading {
  min-width: 0;
  flex: 1;
}

.sheet-heading h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.sheet-heading p {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.35;
}

.sheet-close {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-2);
}

.sheet-close:hover {
  color: var(--text);
}

.sheet-close .icon {
  width: 17px;
  height: 17px;
}

.sheet-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 18px calc(22px + var(--safe-bottom));
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.sheet-content::-webkit-scrollbar {
  width: 5px;
}
.sheet-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border-strong);
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes sheet-down {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

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

@media (min-width: 720px) {
  .sheet-layer {
    align-items: center;
  }
  .sheet-panel {
    width: min(560px, calc(100% - 40px));
    max-height: min(88dvh, 880px);
    border-bottom: 1px solid var(--border);
    border-radius: 26px;
    animation: modal-in 0.22s cubic-bezier(0.22, 0.8, 0.28, 1) both;
  }
  .sheet-panel.is-closing {
    animation: modal-out 0.16s ease both;
  }
  .sheet-grabber {
    display: none;
  }
  .sheet-header {
    padding-top: 18px;
  }
  @keyframes modal-in {
    from {
      opacity: 0;
      transform: translateY(12px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes modal-out {
    from {
      opacity: 1;
      transform: none;
    }
    to {
      opacity: 0;
      transform: translateY(8px) scale(0.99);
    }
  }
}

/* Forms */

.form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > label,
.field-label {
  color: var(--text-2);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.field-hint {
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.35;
}

.field-error {
  color: var(--danger);
  font-size: 10px;
  line-height: 1.35;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.input {
  height: 48px;
  padding: 0 13px;
}

.textarea {
  min-height: 98px;
  resize: vertical;
  padding: 11px 13px;
  line-height: 1.45;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input.is-invalid,
.textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.input[type="date"],
.input[type="time"] {
  color-scheme: dark;
}

:root[data-theme="light"] .input[type="date"],
:root[data-theme="light"] .input[type="time"] {
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .input[type="date"],
  :root[data-theme="auto"] .input[type="time"] {
    color-scheme: light;
  }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 9px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-add-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
}

.field-add-time .icon {
  width: 13px;
  height: 13px;
}

.extra-times {
  display: grid;
  gap: 6px;
}

.extra-times:empty {
  display: none;
}

.time-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
}

.time-row .input {
  height: 42px;
  padding: 0 10px;
  font-size: 12px;
}

.time-row-time {
  font-family: var(--mono);
  font-size: 11px !important;
  font-variant-numeric: tabular-nums;
}

.time-row-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
}

.time-row-remove:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.detail-schedule {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.schedule-list {
  display: grid;
  gap: 7px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.schedule-row b {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.schedule-row span {
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.35;
}

.schedule-row.is-main b {
  color: var(--accent);
}

.schedule-row.is-main span {
  color: var(--text);
  font-weight: 600;
}


.type-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.type-choice {
  position: relative;
  height: 74px;
  padding: 8px 7px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.type-choice .icon {
  width: 20px;
  height: 20px;
  color: var(--choice-color);
}

.type-choice span {
  font-size: 9.5px;
  font-weight: 650;
  color: var(--text-2);
}

.type-choice[data-type="ride"] {
  --choice-color: var(--ride);
}
.type-choice[data-type="run"] {
  --choice-color: var(--run);
}
.type-choice[data-type="other"] {
  --choice-color: var(--other);
}

.type-choice:hover {
  background: var(--surface-3);
}

.type-choice.is-selected {
  border-color: var(--choice-color);
  background: var(--surface);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--choice-color) 18%, transparent);
}

.type-choice.is-selected span {
  color: var(--text);
}

.type-choice-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--choice-color);
  color: #101511;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.type-choice-check .icon {
  width: 10px;
  height: 10px;
  color: inherit;
  stroke-width: 3;
}

.type-choice.is-selected .type-choice-check {
  opacity: 1;
  transform: none;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.45;
}

.form-note .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--amber);
}

.form-actions {
  display: flex;
  gap: 7px;
  padding-top: 3px;
}

.form-actions .btn--primary {
  flex: 1;
}

.char-count {
  justify-self: end;
  color: var(--muted);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

/* Detail sheet */

.detail-top {
  position: relative;
  margin: 1px -18px 0;
  padding: 8px 18px 17px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.detail-top::before {
  content: "";
  position: absolute;
  top: -70px;
  left: -50px;
  width: 260px;
  height: 200px;
  border-radius: 50%;
  background: var(--detail-color, var(--accent));
  filter: blur(70px);
  opacity: 0.17;
  pointer-events: none;
}

.detail-top[data-type="ride"] {
  --detail-color: var(--ride);
}
.detail-top[data-type="run"] {
  --detail-color: var(--run);
}
.detail-top[data-type="other"] {
  --detail-color: var(--other);
}

.detail-badges {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 9px;
  font-weight: 700;
}

.pill .icon {
  width: 12px;
  height: 12px;
}

.pill--type {
  background: color-mix(in srgb, var(--detail-color) 13%, transparent);
  color: var(--detail-color);
}

.pill--pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.pill--rejected,
.pill--cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill--published {
  background: var(--green-soft);
  color: var(--green);
}

.detail-datetime {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-top: 12px;
}

.detail-datetime .big-date {
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.detail-datetime .time-block {
  display: grid;
  gap: 1px;
}

.detail-datetime .time-block strong {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-datetime .time-block span {
  color: var(--text-3);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.detail-top h2 {
  position: relative;
  margin-top: 10px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.detail-top h2.is-cancelled {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  opacity: 0.6;
}

.detail-author {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.detail-author .avatar {
  width: 29px;
  height: 29px;
  font-size: 9px;
}

.detail-author-copy {
  min-width: 0;
}

.detail-author-copy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 650;
}

.detail-author-copy span {
  display: block;
  color: var(--text-3);
  font-size: 8.5px;
}

.detail-body {
  display: grid;
  gap: 15px;
  padding-top: 16px;
}

.detail-description {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-line;
}

.detail-info {
  display: grid;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
}

.info-row:first-child {
  border-top: 0;
}

.info-row .icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--text-3);
}

.info-row span {
  color: var(--text-3);
}

.info-row strong {
  margin-left: auto;
  color: var(--text-2);
  font-weight: 600;
  text-align: right;
}

.detail-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 10px;
  line-height: 1.45;
}

.detail-alert--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.detail-alert .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.rsvp-large {
  height: 47px;
  padding: 0 16px;
  justify-content: space-between;
  border-radius: 13px;
}

.rsvp-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rsvp-live .icon {
  width: 17px;
  height: 17px;
}

.rsvp-number {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--hover);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rsvp-large.is-on .rsvp-number {
  background: var(--accent-soft);
  color: var(--accent);
}

.rsvp-large.is-on {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}

.reason-grid {
  display: grid;
  gap: 6px;
}

.reason-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.reason-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.reason-option:hover {
  border-color: var(--border-strong);
}

.reason-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.reason-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mod-card[data-action="open-event"] {
  cursor: pointer;
}

.mod-card[data-action="open-event"]:hover {
  border-color: var(--border-strong);
}

.link-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
}

.link-button:hover {
  border-color: var(--border-strong);
}

.link-button .link-icon {
  width: 31px;
  height: 31px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.link-button .link-icon .icon {
  width: 16px;
  height: 16px;
}

.link-button .link-copy {
  min-width: 0;
  flex: 1;
}

.link-button .link-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}

.link-button .link-copy span {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.link-button > .icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--text-3);
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.action-tile {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
  text-align: left;
}

.action-tile:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.action-tile .icon {
  width: 15px;
  height: 15px;
  color: var(--text-3);
}

.action-tile--danger {
  color: var(--danger);
  grid-column: 1 / -1;
}

.action-tile--danger .icon {
  color: var(--danger);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.mod-zone {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 118, 118, 0.16);
  background: rgba(255, 118, 118, 0.035);
}

.mod-zone .section-label {
  color: var(--danger);
}

.mod-zone .section-label::after {
  background: rgba(255, 118, 118, 0.16);
}

.mod-zone-actions {
  display: flex;
  gap: 6px;
}

.mod-zone-actions .btn {
  flex: 1;
}

/* Menu / rules */

.menu-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.menu-profile .avatar {
  width: 38px;
  height: 38px;
}

.menu-profile strong {
  display: block;
  font-size: 12px;
}

.menu-profile span {
  display: block;
  color: var(--text-3);
  font-size: 9.5px;
}

.menu-list {
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.menu-item {
  width: 100%;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  text-align: left;
  font-size: 11.5px;
}

.menu-item:first-child {
  border-top: 0;
}

.menu-item:hover {
  background: var(--hover);
  color: var(--text);
}

.menu-item .icon {
  width: 17px;
  height: 17px;
  color: var(--text-3);
}

.menu-item .menu-arrow {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.menu-item--danger {
  color: var(--danger);
}

.menu-item--danger .icon {
  color: var(--danger);
}

.menu-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-top: 1px solid var(--border);
}

.menu-theme-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-2);
  font-size: 11.5px;
}

.menu-theme-label .icon {
  width: 17px;
  height: 17px;
  color: var(--text-3);
}

.rules {
  display: grid;
  gap: 12px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}

.rules h3 {
  margin-top: 4px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}

.rules ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.rules li::marker {
  color: var(--accent);
}

.rules p {
  color: var(--text-2);
}

.rules .muted {
  color: var(--text-3);
  font-size: 10.5px;
}

/* Toasts */

.toast-root {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: calc(94px + var(--safe-bottom));
  width: min(calc(100% - 32px), 480px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  animation: toast-in 0.22s ease both;
  pointer-events: auto;
}

.toast.is-leaving {
  animation: toast-out 0.18s ease both;
}

.toast .icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--accent);
}

.toast--error .icon {
  color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

/* Misc */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

.inline-error {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 50px 18px;
  text-align: center;
}

.inline-error .empty-glyph {
  background: var(--danger-soft);
  color: var(--danger);
}

.inline-error h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.inline-error p {
  max-width: 300px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

.error-detail {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  word-break: break-word;
}

.spin {
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 370px) {
  .main {
    padding-inline: 13px;
  }
  .topbar {
    padding-inline: 14px;
  }
  .type-tab {
    height: 68px;
    padding-inline: 6px;
  }
  .type-tab-label {
    font-size: 9px;
  }
  .event-card {
    grid-template-columns: 35px 27px minmax(0, 1fr) auto;
    gap: 6px;
    padding-left: 13px;
  }
  .event-title-row h3 {
    font-size: 14px;
  }
  .rsvp-pill {
    min-width: 41px;
    padding-inline: 6px;
  }
}

@media (max-height: 720px) {
  .topbar {
    padding-top: calc(9px + env(safe-area-inset-top, 0px));
    padding-bottom: 8px;
  }
  .logo-mark {
    width: 38px;
    height: 38px;
    padding-inline: 8px;
  }
  .brand-title-row h1 {
    font-size: 21px;
  }
  .type-tab {
    height: 62px;
    padding-top: 7px;
    padding-bottom: 6px;
  }
  .type-tab-icon {
    width: 24px;
    height: 24px;
  }
  .type-tab-icon .icon {
    width: 15px;
    height: 15px;
  }
  .board-toolbar {
    padding-top: 13px;
  }
  .day-group {
    margin-top: 10px;
  }
  .event-list {
    gap: 6px;
    margin-top: 6px;
  }
  .event-card {
    min-height: 72px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

@media (max-width: 330px) {
  .event-glyph {
    display: none;
  }
  .event-card {
    grid-template-columns: 35px minmax(0, 1fr) auto;
  }
}

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