/* ── Design tokens ──────────────────────────────────────────────── */

:root {
  --bg:        oklch(0.95 0.022 95);
  --surface:   #fff;
  --surface-2: oklch(0.98 0.008 75);
  --line:      oklch(0.90 0.006 75);
  --line-2:    oklch(0.86 0.007 75);

  --ink:   oklch(0.18 0.008 60);
  --body:  oklch(0.32 0.005 260);
  --muted: oklch(0.55 0.005 260);
  --label: oklch(0.45 0.006 260);
  --faint: oklch(0.65 0.005 260);

  --brand:      oklch(0.48 0.18 258);
  --brand-ink:  oklch(0.36 0.16 258);
  --brand-soft: oklch(0.72 0.11 258);
  --brand-bg:   oklch(0.96 0.03 258);
  --brand-bg-2: oklch(0.93 0.06 258);

  /* legacy alias */
  --purple:      var(--brand);
  --purple-ink:  var(--brand-ink);
  --purple-soft: var(--brand-soft);
  --purple-bg:   var(--brand-bg);
  --purple-bg-2: var(--brand-bg-2);

  --coral:     oklch(0.66 0.17 30);
  --coral-ink: oklch(0.50 0.16 30);
  --coral-bg:  oklch(0.96 0.05 30);
  --coral-bg-2:oklch(0.92 0.08 30);

  --amber:     oklch(0.74 0.16 82);
  --amber-ink: oklch(0.48 0.13 78);
  --amber-bg:  oklch(0.97 0.05 85);
  --amber-bg-2:oklch(0.93 0.09 85);

  --green:     oklch(0.62 0.15 148);
  --green-ink: oklch(0.40 0.13 148);
  --green-bg:  oklch(0.94 0.07 148);
  --green-bg-2:oklch(0.88 0.11 148);

  /* ── Brand tokens (from brand package) ──────────────────────── */
  --gg-emerald:         oklch(0.47 0.11 162);
  --gg-emerald-deep:    oklch(0.36 0.095 162);
  --gg-emerald-light:   oklch(0.66 0.12 162);
  --gg-terracotta:      oklch(0.60 0.16 42);
  --gg-terracotta-deep: oklch(0.50 0.155 40);
  --gg-ink:             oklch(0.24 0.02 155);
  --gg-body:            oklch(0.44 0.02 150);
  --gg-muted:           oklch(0.56 0.02 90);
  --gg-cream:           oklch(0.975 0.022 150);
  --gg-paper:           oklch(0.985 0.008 95);
  --gg-bg:              oklch(0.952 0.022 95);
  --gg-line:            oklch(0.89 0.016 95);
  --gg-dark:            oklch(0.27 0.028 162);
  --gg-font-head:       'Spectral', Georgia, 'Times New Roman', serif;
  --gg-font-body:       'DM Sans', system-ui, -apple-system, sans-serif;

  /* ── Tabletop Green navbar tokens ───────────────────────────── */
  --tt-bar:         oklch(0.975 0.014 95);
  --tt-bar-mobile:  oklch(0.985 0.01  95);
  --tt-line:        oklch(0.88  0.02  95);
  --tt-ink:         oklch(0.26  0.02  80);
  --tt-muted:       oklch(0.50  0.02  80);
  --tt-chip:        oklch(0.995 0.004 95);
  --tt-emerald:     oklch(0.47  0.11  162);
  --tt-emerald-ink: oklch(0.39  0.10  162);
  --tt-on-emerald:  oklch(0.97  0.02  150);
  --tt-terracotta:  oklch(0.60  0.16  42);
  --tt-weekend:     oklch(0.94  0.03  75);
  --tt-heat-ink:    oklch(0.40  0.13  148);
  --tt-star:        oklch(0.55  0.13  148);
  --tt-sig-ink:     oklch(0.39  0.10  162);

  --blue:    oklch(0.70 0.09 230);
  --blue-bg: oklch(0.94 0.04 230);

  --radius:    8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(30,20,8,.04);
  --shadow:    0 1px 3px rgba(30,20,8,.05), 0 4px 12px rgba(30,20,8,.04);

  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-head: 'Spectral', Georgia, serif;
}

/* ── Reset ──────────────────────────────────────────────────────── */

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

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

/* ── Navbar ─────────────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 30px;
  box-sizing: border-box;
  background: var(--tt-bar);
  border-bottom: 1.5px solid var(--tt-line);
}

.navbar__logo {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Brand lockup (mark + wordmark) ──────────────────────────── */

.gg-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.gg-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.gg-lockup__stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gg-lockup__name {
  font-family: var(--gg-font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--gg-ink);
  letter-spacing: -0.015em;
  line-height: 1;
}

.gg-lockup__name i {
  color: var(--gg-terracotta);
  font-style: normal;
}

.gg-lockup__desc {
  font-family: var(--gg-font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gg-terracotta-deep);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
}

.navbar__cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 17px 0 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--tt-muted);
  background: transparent;
  white-space: nowrap;
  transition: background 120ms, color 120ms, box-shadow 120ms;
}

.navbar__cal-chip[aria-current="page"] {
  color: var(--tt-on-emerald);
  background: var(--tt-emerald);
  box-shadow: 0 2px 6px color-mix(in oklch, var(--tt-emerald) 40%, transparent),
              inset 0 1px 0 rgba(255,255,255,.18);
}

.navbar__nav-divider {
  width: 1px;
  height: 26px;
  background: var(--tt-line);
  margin: 0 2px;
  flex-shrink: 0;
}

.navbar__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--tt-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
  transition: color 120ms, border-color 120ms;
}

.navbar__link:hover {
  color: var(--tt-ink);
}

.navbar__link[aria-current="page"] {
  font-weight: 700;
  color: var(--tt-ink);
  border-bottom-color: var(--tt-emerald);
}

.navbar__spacer {
  flex: 1;
}

.navbar__utility {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.navbar__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--tt-chip);
  border: 1.5px solid var(--tt-line);
  color: var(--tt-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  position: relative;
  text-decoration: none;
}

.navbar__icon-btn:hover {
  background: var(--tt-bar);
}

.navbar__notif-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tt-terracotta);
  box-shadow: 0 0 0 1.5px var(--tt-bar);
}

.navbar__create-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 17px;
  border-radius: 9px;
  background: var(--tt-terracotta);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(40,30,10,.18);
  text-decoration: none;
  transition: filter 120ms;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar__create-btn:hover {
  filter: brightness(0.94);
}

.navbar__create-short {
  display: none;
}

/* ── Avatar chip ───────────────────────────────────────────── */
.navbar__avatar-wrap {
  position: relative;
}

.navbar__avatar-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  border: 1.5px solid var(--tt-line);
  background: var(--tt-chip);
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: border-color 120ms;
}

.navbar__avatar-chip:hover {
  border-color: var(--tt-emerald);
}

.navbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--tt-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tt-on-emerald);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1;
}

.navbar__avatar-handle {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tt-ink);
}

/* ── Avatar dropdown ───────────────────────────────────────── */
.navbar__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 200;
}

.navbar__dropdown-item {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
  transition: background 100ms, color 100ms;
}

.navbar__dropdown-item:hover {
  background: var(--bg);
  color: var(--ink);
}

.navbar__dropdown-item--admin {
  color: var(--brand-ink);
}

.navbar__dropdown-item--danger {
  color: oklch(0.50 0.16 30);
}

.navbar__dropdown-item--danger:hover {
  background: var(--coral-bg);
}

.navbar__dropdown-sep {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .navbar__avatar-handle {
    display: none;
  }
  .navbar__avatar-chip {
    padding: 4px;
  }
}

@media (max-width: 960px) {
  .navbar__create-long {
    display: none;
  }
  .navbar__create-short {
    display: inline;
  }
}

/* ── Toast ──────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  top: 66.67vh;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(40ch, calc(100vw - 16px));
  width: max-content;
  word-break: break-word;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  z-index: 9999;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.toast--in  { opacity: 1; }
.toast--out { opacity: 0; transition: opacity 300ms ease; }

.toast--success {
  background: var(--green-bg);
  color: var(--green-ink);
  border: 1px solid oklch(0.80 0.08 145);
}
.toast--error {
  background: oklch(0.93 0.06 18);
  color: oklch(0.38 0.14 18);
  border: 1px solid oklch(0.78 0.10 18);
}

/* ── Card ───────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ── Buttons ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s, filter 0.12s;
  white-space: nowrap;
  min-width: 140px;
  text-decoration: none;
}

.btn--sm {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  min-width: 0;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  min-width: 0;
}

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn--primary:hover { filter: brightness(0.93); }

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--secondary:hover { background: var(--surface-2); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--body);
}
.btn--ghost:hover { background: var(--surface-2); }

.btn--signal {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}
.btn--signal:hover { filter: brightness(0.96); }

.btn--danger {
  background: oklch(0.93 0.07 18);
  border-color: oklch(0.76 0.12 18);
  color: oklch(0.36 0.16 18);
}
.btn--danger:hover { background: oklch(0.88 0.10 18); }

.btn--coral {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral-ink);
  box-shadow: 0 1px 2px rgba(180,70,30,.18);
}
.btn--coral:hover { filter: brightness(.97); }

.btn--lg {
  height: 50px;
  padding: 0 26px;
  font-size: 16px;
  border-radius: 11px;
}

/* ── Stepper ────────────────────────────────────────────────────── */

.stepper-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.stepper-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  color: var(--body);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.stepper-btn:hover { background: var(--surface-2); }

.stepper-input {
  width: 44px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 5px 0;
  border: 1.5px solid var(--line-2);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  -moz-appearance: textfield;
}
.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button { display: none; }
.stepper-input:focus { border-color: var(--brand); }

.stepper-input--wide { width: 60px; }

.stepper-sep {
  font-size: 13px;
  color: var(--muted);
  padding: 0 4px;
  flex-shrink: 0;
}

/* ── Small buttons (shared) ─────────────────────────────────────── */

.btn-sm {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--body);
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-sm:hover { background: var(--surface-2); }

.btn-sm--danger {
  border-color: oklch(0.78 0.12 18);
  color: oklch(0.40 0.16 18);
}
.btn-sm--danger:hover { background: oklch(0.94 0.06 18); }

.btn-sm--leave {
  border-color: var(--line-2);
  color: var(--muted);
}
.btn-sm--leave:hover,
.btn-sm--leave:focus {
  border-color: oklch(0.78 0.12 18);
  color: oklch(0.40 0.16 18);
  background: oklch(0.97 0.03 18);
}

.btn-sm--accept {
  border-color: oklch(0.74 0.14 155);
  color: oklch(0.30 0.16 155);
}
.btn-sm--accept:hover { background: oklch(0.92 0.07 155); }

/* ── Label ──────────────────────────────────────────────────────── */

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

/* ── Badge (shared utility) ─────────────────────────────────────── */

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: 0.01em;
}

.badge--planning {
  background: var(--amber-bg);
  color: var(--amber-ink);
  border: 1px solid oklch(0.82 0.12 82);
}

.badge--live {
  background: var(--green-bg);
  color: var(--green-ink);
  border: 1px solid oklch(0.78 0.13 148);
}

.badge--failed {
  background: oklch(0.93 0.07 245);
  color: oklch(0.32 0.12 245);
}

.badge--introvert {
  background: var(--brand-bg);
  color: var(--brand-ink);
}

.badge--extrovert {
  background: var(--green-bg);
  color: var(--green-ink);
}

.badge--count {
  background: var(--coral-bg-2);
  color: var(--coral-ink);
}

/* ── Coachmark (guided bubble) ──────────────────────────────────── */

.coachmark {
  position: fixed;
  z-index: 900;
  max-width: 300px;
  background: #fff;
  border: 1px solid oklch(0.88 0.008 75);
  border-radius: 12px;
  box-shadow: 0 4px 20px oklch(0 0 0 / 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.coachmark--visible {
  opacity: 1;
  pointer-events: auto;
}

.coachmark--out {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.coachmark__arrow {
  position: absolute;
  width: 11px;
  height: 11px;
  top: -6px;
  left: 20px;
  background: #fff;
  border-top: 1px solid oklch(0.88 0.008 75);
  border-left: 1px solid oklch(0.88 0.008 75);
  transform: rotate(45deg);
}

.coachmark__body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 12px;
}

.coachmark__icon {
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.coachmark__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coachmark__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.coachmark__text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.coachmark__hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.coachmark__chip {
  display: inline-block;
  background: oklch(0.93 0.008 75);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid oklch(0.85 0.008 75);
}

@media (min-width: 769px) {
  .coachmark__content--mobile { display: none; }
}
@media (max-width: 768px) {
  .coachmark__content--desktop { display: none; }
}

/* ── Section heading ────────────────────────────────────────────── */

.section-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* ── Visibility option cards (shared — used in create-group modal) ── */

.profile__visibility-cards {
  display: flex;
  gap: 12px;
}

.profile__vis-card {
  flex: 1;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.12s, background 0.12s;
}

.profile__vis-card:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-bg);
}

.profile__vis-card input[type="radio"] {
  display: none;
}

.profile__vis-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 4px;
}

.profile__vis-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.profile__vis-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .profile__visibility-cards {
    flex-direction: column;
  }
}

/* ── Create-group modal ──────────────────────────────────────────── */

.create-group-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px oklch(0 0 0 / 0.18);
  background: oklch(0.995 0.003 80);
  margin: 8vh auto auto;
}

.create-group-dialog::backdrop {
  background: oklch(0.10 0.008 260 / 0.4);
  backdrop-filter: blur(3px);
}

.create-group-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: oklch(0.97 0.008 292);
  border-bottom: 1px solid oklch(0.90 0.006 75);
}

.create-group-dialog__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: oklch(0.45 0.12 292);
  text-transform: uppercase;
}

.create-group-dialog__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: oklch(0.55 0.005 260);
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-group-dialog__close:hover {
  background: oklch(0.92 0.006 75);
}

.create-group-dialog__form {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-group-dialog__form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.create-group-dialog__form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
}

.create-group-dialog__form input[type="text"],
.create-group-dialog__form textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 13px;
  border: 1.5px solid oklch(0.86 0.007 75);
  border-radius: 8px;
  background: oklch(0.98 0.004 80);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
  width: 100%;
}

.create-group-dialog__form input:focus,
.create-group-dialog__form textarea:focus {
  border-color: oklch(0.68 0.20 292);
}

.create-group-dialog__footer {
  border-top: 1px solid oklch(0.91 0.006 75);
  padding-top: 16px;
  margin-top: 4px;
}

.create-group-dialog__submit {
  width: 100%;
  height: 44px;
}

/* ── Help modal ──────────────────────────────────────────────────── */

.help-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px oklch(0 0 0 / 0.18);
  background: oklch(0.995 0.003 80);
  margin: 8vh auto auto;
}

.help-modal::backdrop {
  background: oklch(0.10 0.008 260 / 0.4);
  backdrop-filter: blur(3px);
}

.help-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: oklch(0.97 0.008 292);
  border-bottom: 1px solid var(--line);
}

.help-modal__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: oklch(0.45 0.12 292);
  text-transform: uppercase;
}

.help-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-modal__close:hover {
  background: oklch(0.92 0.006 75);
}

.help-modal__body {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--body);
  line-height: 1.6;
}

.help-modal__body p { margin: 0; }

.help-modal__body ul {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-modal__body > ul > li {
  padding-left: 16px;
  position: relative;
}

.help-modal__body > ul > li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.help-modal__section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* legend list inside the help modal (calendar) */
.help-modal__body .help__legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-modal__body .help__legend li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-left: 0;
}

.help-modal__body .help__legend li::before { display: none; }

/* ── Help legend symbols (shared between modal and old help page) ── */

.help__dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 3px;
}

.help__dot--live           { background: oklch(0.76 0.14 145); }
.help__dot--planning       { background: oklch(0.78 0.13 85); }
.help__dot--failed         { background: oklch(0.76 0.11 245); }
.help__dot--needs-response { background: oklch(0.76 0.16 55); }
.help__dot--available      { background: oklch(0.72 0.16 85); }

.help__star {
  font-size: 16px;
  color: oklch(0.40 0.18 145);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

/* ── Group action button pairs ───────────────────────────────────── */

.groups__actions,
.profile__group-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 600px) {
  .groups__actions,
  .profile__group-actions {
    flex-direction: column;
  }

  .groups__actions .btn,
  .profile__group-actions .btn {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
}

/* ── Footer ─────────────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.06em;
}

/* ── Mobile utilities ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .btn--mobile-full {
    width: 100%;
    min-width: 0;
  }
}

/* ── Mobile bottom tab bar ──────────────────────────────────────── */

.mobile-tab-bar {
  display: none;
}

@media (max-width: 768px) {
  .navbar {
    display: none;
  }

  .site-footer {
    display: none;
  }

  body {
    padding-bottom: 68px;
  }

  .mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--tt-bar-mobile);
    border-top: 1px solid var(--tt-line);
    padding-top: 8px;
    padding-bottom: 26px;
    justify-content: space-around;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
  }

  .mobile-tab-bar__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    min-width: 58px;
    color: var(--tt-muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-tab-bar__tab--active {
    color: var(--tt-emerald);
  }

  .mobile-tab-bar__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
  }

  /* button reset for profile tab */
  .mobile-tab-bar__tab[type="button"] {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
  }

  /* active dot below label */
  .mobile-tab-bar__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: transparent;
  }

  .mobile-tab-bar__tab--active .mobile-tab-bar__dot {
    background: var(--tt-emerald);
  }

  .mobile-tab-bar__tab--active .mobile-tab-bar__label {
    color: var(--tt-emerald);
    font-weight: 700;
  }

  /* Calendar hero — always the raised square */
  .mobile-tab-bar__tab--hero {
    gap: 3px;
    padding-top: 0;
  }

  .mobile-tab-bar__hero-sq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    margin-top: -22px;
    /* default: outlined (not active screen) */
    background: #fff;
    border: 2px solid var(--tt-emerald);
    color: var(--tt-emerald);
    box-shadow: 0 4px 12px color-mix(in oklch, var(--tt-emerald) 20%, transparent);
    transition: background 0.15s, box-shadow 0.15s;
  }

  /* filled when Calendar is the active screen */
  .mobile-tab-bar__tab--hero.mobile-tab-bar__tab--hero-active .mobile-tab-bar__hero-sq {
    background: var(--tt-emerald);
    border-color: var(--tt-emerald);
    color: var(--tt-on-emerald);
    box-shadow:
      0 6px 16px color-mix(in oklch, var(--tt-emerald) 45%, transparent),
      0 0 0 5px color-mix(in oklch, var(--tt-emerald) 14%, transparent);
  }

  .mobile-tab-bar__label--hero {
    color: var(--tt-emerald-ink);
    font-weight: 700;
  }

  .mobile-tab-bar__tab--hero .mobile-tab-bar__dot {
    background: transparent;
  }

  .mobile-tab-bar__tab--hero.mobile-tab-bar__tab--hero-active .mobile-tab-bar__dot {
    background: var(--tt-emerald);
  }

  .mobile-tab-bar--peek {
    transform: translateY(calc(100% - 28px));
  }
}

/* ── Mobile masthead ────────────────────────────────────────────── */

.mobile-masthead {
  display: none;
}

@media (max-width: 768px) {
  .mobile-masthead {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--tt-line);
    position: sticky;
    top: 0;
    z-index: 99;
    flex-shrink: 0;
  }

  .mobile-masthead__mark {
    flex-shrink: 0;
  }

  .mobile-masthead__lockup {
    gap: 2px;
  }

  .mobile-masthead__lockup .gg-lockup__name {
    font-size: 17px;
  }

  .mobile-masthead__lockup .gg-lockup__desc {
    font-size: 7.5px;
  }

  .mobile-masthead__spacer {
    flex: 1;
  }

  .mobile-masthead__bell {
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--tt-line);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tt-ink);
    flex-shrink: 0;
  }

  .mobile-masthead__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tt-emerald);
    color: var(--tt-on-emerald);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
  }

  .mobile-masthead__dropdown {
    right: 14px;
    left: auto;
  }
}

/* ── Mobile profile dialog ──────────────────────────────────────── */

.mobile-profile-dialog {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  border: none;
  border-radius: 20px 20px 0 0;
  padding: 0;
  max-height: 70vh;
  width: 100%;
  box-shadow: 0 -2px 20px rgba(20, 15, 8, .12);
  background: #fff;
  overflow: hidden;
}

.mobile-profile-dialog::backdrop {
  background: rgba(20, 15, 8, .45);
  backdrop-filter: blur(2px);
}

.mobile-profile-dialog__grab {
  width: 38px;
  height: 4.5px;
  background: var(--line-2, oklch(0.86 0.007 75));
  border-radius: 999px;
  margin: 10px auto 0;
}

.mobile-profile-dialog__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--tt-line);
}

.mobile-profile-dialog__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tt-emerald);
  color: var(--tt-on-emerald);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-profile-dialog__identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mobile-profile-dialog__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--tt-ink);
}

.mobile-profile-dialog__handle {
  font-size: 13px;
  color: var(--tt-muted);
}

.mobile-profile-dialog__close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tt-muted);
  flex-shrink: 0;
}

.mobile-profile-dialog__nav {
  padding: 8px 0 20px;
  display: flex;
  flex-direction: column;
}

.mobile-profile-dialog__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--tt-ink);
  text-decoration: none;
}

.mobile-profile-dialog__item:active {
  background: var(--gg-bg);
}

.mobile-profile-dialog__item--admin {
  color: var(--tt-emerald-ink);
}

.mobile-profile-dialog__item--danger {
  color: oklch(0.52 0.18 25);
}

.mobile-profile-dialog__sep {
  height: 1px;
  background: var(--tt-line);
  margin: 4px 0;
}
