:root {
  --navy: #172a46;
  --navy-dark: #0d1b2f;
  --blue: #2c6bed;
  --gold: #c99b3b;
  --gold-soft: #f7ecd2;
  --cream: #fbfaf7;
  --white: #ffffff;
  --text: #202937;
  --muted: #718096;
  --line: #e2e8f0;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --success: #18764e;
  --shadow: 0 18px 50px rgba(23, 42, 70, .10);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--cream);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
}

.hidden {
  display: none !important;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.startup-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
  color: var(--navy);
  background: var(--cream);
}

.loader-mark,
.brand-logo,
.auth-logo,
.showcase-logo {
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  font-weight: 950;
}

.loader-mark {
  width: 62px;
  height: 62px;
  border-radius: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  color: white;
  background: var(--navy);
  box-shadow: 0 7px 26px rgba(0, 0, 0, .14);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: .8rem;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy small {
  color: #dbe4ef;
  font-size: .74rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav button,
.mobile-menu-content button {
  border: 0;
  border-radius: 10px;
  color: white;
  background: transparent;
  padding: 10px 12px;
  font-weight: 750;
}

.desktop-nav button:hover {
  background: rgba(255,255,255,.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: white;
}

.mobile-menu {
  position: fixed;
  top: 72px;
  right: 0;
  z-index: 42;
  width: min(320px, calc(100% - 28px));
  min-height: 230px;
  border-radius: 0 0 0 20px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.mobile-menu-content {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.mobile-menu-content button {
  padding: 13px;
  text-align: left;
}

.mobile-menu-content button:hover {
  background: rgba(255,255,255,.12);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 72px 0 0;
  z-index: 40;
  background: rgba(0,0,0,.45);
}

.icon-button {
  border: 0;
  color: white;
  background: transparent;
  font-size: 1.8rem;
}

.landing-view,
.auth-view {
  min-height: calc(100vh - 72px);
  padding: 64px 0;
}

.landing-view {
  background:
    radial-gradient(circle at 10% 0%, rgba(201,155,59,.18), transparent 36%),
    linear-gradient(135deg, #f6f9fc, #eaf1f6);
}

.landing-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 50px;
}

.eyebrow {
  color: var(--gold);
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 1.02;
}

h2 {
  margin-top: 0;
}

.landing-copy p {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.12rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.landing-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.landing-highlights span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(255,255,255,.75);
  font-size: .82rem;
}

.landing-showcase {
  overflow: hidden;
  min-height: 390px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 28px;
  color: white;
  background: linear-gradient(145deg, var(--navy), #356b91);
  box-shadow: 0 28px 65px rgba(23,42,70,.22);
}

.showcase-top {
  display: flex;
  gap: 7px;
  padding: 18px 20px;
  background: rgba(0,0,0,.12);
}

.showcase-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.58);
}

.showcase-content {
  padding: 52px 44px;
}

.showcase-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 26px;
  border-radius: 22px;
  font-size: 1.2rem;
}

.showcase-content h2 {
  color: white;
  font-size: 2.2rem;
}

.showcase-content p {
  color: #d8e7f2;
  font-size: 1.04rem;
}

.auth-view {
  display: grid;
  place-items: center;
  background: #edf3f8;
}

.auth-shell {
  width: min(1010px, 100%);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  overflow: hidden;
  border-radius: 25px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-brand {
  padding: 54px 45px;
  color: white;
  background: linear-gradient(145deg, var(--navy), #376d94);
}

.auth-brand h1 {
  color: white;
  font-size: clamp(2.4rem, 4vw, 3.7rem);
}

.auth-brand p {
  color: #dbe8f3;
}

.auth-logo {
  width: 70px;
  height: 70px;
  margin-bottom: 24px;
  border-radius: 22px;
}

.auth-card {
  padding: 38px;
}

.auth-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 11px 0;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.auth-tabs button.active {
  color: var(--navy);
  border-color: var(--gold);
}

.form-heading h2 {
  margin-bottom: 5px;
}

.form-heading p,
.page-subtitle {
  margin-top: 0;
  color: var(--muted);
}

.form,
.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 750;
}

label em {
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  color: var(--text);
  background: var(--white);
}

input:disabled {
  cursor: not-allowed;
  opacity: .62;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(44,107,237,.16);
  border-color: var(--blue);
}

textarea {
  resize: vertical;
}

.checkbox-row {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 9px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 750;
}

.button {
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 16px;
  font-weight: 850;
  transition: transform .18s ease, box-shadow .18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(23,42,70,.12);
}

.primary {
  color: white;
  background: var(--navy);
}

.secondary {
  color: var(--navy);
  background: var(--gold-soft);
  border-color: #dfc88d;
}

.quiet {
  color: var(--navy);
  background: #edf1f5;
}

.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #efc5c0;
}

.full-width {
  width: 100%;
}

.mobile-only {
  display: none;
}

.app-container {
  padding: 38px 0 110px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.page-header h1 {
  margin-bottom: 5px;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.search-panel {
  margin-bottom: 25px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 9px 28px rgba(23,42,70,.06);
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
}

.search-icon {
  color: var(--muted);
  font-size: 1.4rem;
}

.search-box input {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}

.event-card,
.card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.event-card {
  overflow: hidden;
}

.event-image {
  height: 158px;
  background: linear-gradient(145deg, var(--navy), #376d94);
  background-position: center;
  background-size: cover;
}

.event-content {
  padding: 19px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.badge {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--navy);
  background: var(--gold-soft);
  font-size: .71rem;
  font-weight: 900;
}

.badge-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.event-card h3 {
  margin: 5px 0 13px;
  font-size: 1.35rem;
}

.event-meta {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.event-actions .button {
  min-height: 37px;
  padding: 8px 11px;
  font-size: .82rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}

.card {
  padding: 24px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-heading h2 {
  margin: 3px 0 0;
  font-size: 1.45rem;
}

.section-label {
  color: var(--gold);
  font-size: .71rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.form-help {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 450;
}

.account-created {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-created span {
  color: var(--muted);
  font-size: .84rem;
}

.toggle-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-setting strong,
.toggle-setting small {
  display: block;
}

.toggle-setting small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 450;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 49px;
  height: 28px;
}

.switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #b7c2ce;
  transition: .2s;
}

.switch span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  transition: .2s;
}

.switch input:checked + span {
  background: var(--blue);
}

.switch input:checked + span::before {
  transform: translateX(21px);
}

.danger-card {
  border-color: #efc5c0;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 21px;
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  color: var(--navy);
  font-size: 2rem;
}

.stat-card span {
  color: var(--muted);
}

.admin-card {
  margin-bottom: 20px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.admin-row strong,
.admin-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row span {
  color: var(--muted);
  font-size: .87rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px 25px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
  font-size: .81rem;
  text-align: center;
}

.mobile-bottom-nav {
  display: none;
}

.toast-area {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(370px, calc(100% - 36px));
}

.toast {
  border-radius: 12px;
  padding: 13px 15px;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,15,30,.72);
}

.editor-modal-card,
.event-modal-card,
.dialog-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 22px;
  padding: 30px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.editor-modal-card {
  width: min(980px, 100%);
}

.dialog-card {
  width: min(480px, 100%);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 2rem;
}

.modal-heading {
  margin-bottom: 23px;
}

.modal-heading h2 {
  margin: 4px 0 5px;
  font-size: 2rem;
}

.modal-heading p {
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.form-error,
.field-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: .88rem;
}

/* Tablet */
@media (max-width: 980px) {
  .landing-layout,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 36px;
  }

  .event-grid,
  .filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone */
@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, 560px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .landing-view,
  .auth-view {
    padding: 30px 0 95px;
  }

  .landing-layout {
    gap: 28px;
  }

  .landing-copy h1 {
    font-size: 2.7rem;
  }

  .landing-showcase {
    min-height: auto;
  }

  .showcase-content {
    padding: 34px 27px;
  }

  .auth-brand {
    padding: 32px 25px;
  }

  .auth-brand h1 {
    font-size: 2.45rem;
  }

  .auth-card {
    padding: 25px 20px;
  }

  .app-container {
    padding-top: 28px;
    padding-bottom: 105px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-header h1 {
    font-size: 2.35rem;
  }

  .search-panel {
    padding: 13px;
  }

  .mobile-only {
    display: block;
  }

  .filter-fields {
    display: none;
    grid-template-columns: 1fr;
    margin-top: 13px;
  }

  .filter-fields.open {
    display: grid;
  }

  .event-grid,
  .form-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .event-image {
    height: 175px;
  }

  .settings-grid {
    gap: 14px;
  }

  .card {
    padding: 20px;
    border-radius: 17px;
  }

  .admin-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .admin-row .button {
    width: fit-content;
    margin-top: 5px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 5px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 -8px 25px rgba(23,42,70,.10);
  }

  .mobile-bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 2px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: .68rem;
    font-weight: 750;
  }

  .mobile-bottom-nav button.active {
    color: var(--blue);
  }

  .bottom-icon {
    min-height: 22px;
    font-size: 1.35rem;
    line-height: 1;
  }

  .site-footer {
    padding-bottom: 94px;
  }

  .editor-modal-card,
  .event-modal-card,
  .dialog-card {
    width: 100%;
    max-height: calc(100vh - 30px);
    padding: 23px 18px;
    border-radius: 19px;
  }

  .modal-heading h2 {
    font-size: 1.75rem;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions .button {
    flex: 1;
  }

  .toast-area {
    right: 14px;
    bottom: 88px;
    width: calc(100% - 28px);
  }
}

:root {
  --ink: var(--navy);
  --surface-2: #edf1f5;
  --header-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --cream: #0c1727;
  --white: #13233a;
  --surface-2: #1b2e4a;
  --text: #eaf0f7;
  --muted: #a3b3c6;
  --line: #27394f;
  --gold-soft: #3a3220;
  --blue: #7aa5ff;
  --ink: #f4f7fb;
  --danger: #ff8f84;
  --danger-soft: #3b1d1d;
  --success: #3ec28f;
  --shadow: 0 12px 34px rgba(0, 0, 0, .38);
}

* {
  -webkit-tap-highlight-color: transparent;
}

button {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(44, 107, 237, .55);
  outline-offset: 2px;
}

h1, h2, h3,
label,
.stat-card strong,
.auth-tabs button.active,
.badge,
.secondary,
.quiet,
.startup-loader {
  color: var(--ink);
}

.auth-brand h1,
.showcase-content h2 {
  color: #fff;
}

.quiet {
  background: var(--surface-2);
}

.event-card h3 {
  color: var(--ink);
}

html[data-theme="dark"] .primary {
  background: #2c6bed;
  color: #fff;
}

html[data-theme="dark"] .secondary {
  border-color: #6b5a2c;
}

html[data-theme="dark"] .danger-card,
html[data-theme="dark"] .danger {
  border-color: #6b2f2f;
}

html[data-theme="dark"] .auth-view {
  background: #08111e;
}

html[data-theme="dark"] .toast {
  background: #26456f;
}

html[data-theme="dark"] .switch span {
  background: #3a4d68;
}

html[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, .72);
}

.danger-solid {
  border-color: transparent;
  color: #fff;
  background: #b42318;
}

.button.small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: .8rem;
}

.desktop-nav button.active {
  background: rgba(255, 255, 255, .16);
}

/* Header & mobile menu: menu opens beneath the header so the hamburger stays tappable */
.site-header {
  padding-top: var(--safe-top);
}

.mobile-menu {
  top: calc(var(--header-h) + var(--safe-top));
  min-height: 0;
  width: min(300px, 100%);
  border-radius: 0 0 0 18px;
}

.mobile-menu-backdrop {
  inset: calc(var(--header-h) + var(--safe-top)) 0 0;
}

/* Password fields */
.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 68px;
}

.show-password {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--blue);
  background: transparent;
  font-size: .85rem;
  font-weight: 800;
}

/* Verification code */
.otp-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-input {
  height: 58px;
  padding: 0;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.verify-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.text-button:disabled {
  color: var(--muted);
  cursor: default;
}

.field-error.info {
  color: var(--blue);
}

/* Toasts: tap anywhere on one to dismiss it */
.toast {
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.leaving {
  opacity: 0;
  transform: translateY(8px);
}

/* Page furniture */
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dfc88d;
  border-radius: 14px;
  color: var(--ink);
  background: var(--gold-soft);
}

html[data-theme="dark"] .notice {
  border-color: #6b5a2c;
}

.badge-warn {
  color: #7a4b00;
  background: #ffe7b3;
}

html[data-theme="dark"] .badge-warn {
  color: #ffe2a8;
  background: #5a4210;
}

.badge-ok {
  color: var(--success);
  background: rgba(24, 118, 78, .12);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 13px;
  background: var(--surface-2);
}

.segmented label {
  position: relative;
  display: block;
}

.segmented input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.segmented span {
  display: block;
  padding: 10px;
  border-radius: 9px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
  cursor: pointer;
}

.segmented input:checked + span {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
}

.segmented input:focus-visible + span {
  outline: 3px solid rgba(44, 107, 237, .55);
}

.legal-links {
  display: none;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

/* Admin */
.tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-2);
}

.tabs button {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tabs button.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .15);
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-toolbar input {
  flex: 1;
}

.admin-toolbar select {
  width: auto;
}

.admin-item {
  display: grid;
  gap: 8px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.admin-item:last-child {
  border-bottom: 0;
}

.admin-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.admin-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: .85rem;
}

.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Modals and sheets */
.sheet {
  scrollbar-width: thin;
  touch-action: pan-y;
}

.editor-modal-card.sheet {
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 8px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.sheet-header .modal-close {
  position: static;
}

.sheet-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.sheet-body {
  flex: 1;
  padding: 0 24px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 24px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--white);
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.form-section h3 {
  margin: 20px 0 12px;
  font-size: 1.05rem;
}

.more-details {
  margin-top: 20px;
  padding: 4px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.more-details summary {
  padding: 12px 0;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.more-details summary small {
  color: var(--muted);
  font-weight: 500;
}

.more-details[open] summary {
  margin-bottom: 6px;
}

.speakers {
  display: grid;
  gap: 12px;
}

.speaker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions.spread {
  justify-content: space-between;
}

.modal-actions-right {
  display: flex;
  gap: 10px;
}

.code-input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .35em;
  font-size: 1.8rem;
  font-weight: 800;
}

.code-display {
  margin: 14px 0;
  padding: 18px 10px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--gold-soft);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: .3em;
  text-indent: .3em;
}

.summary-box {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: .92rem;
}

.summary-box strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.review-card {
  width: min(640px, 100%);
}

.review-section {
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.review-section h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.review-quote {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-2);
  white-space: pre-wrap;
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Installed app: no rubber-band page bounce */
@media (display-mode: standalone) {
  html, body {
    overscroll-behavior-y: none;
  }
}

/* ===== Phone: behave like an app ===== */
@media (max-width: 680px) {
  :root {
    --header-h: 56px;
  }

  body {
    min-height: 100dvh;
    font-size: 16px;
  }

  input, select, textarea {
    font-size: 16px; /* stops iOS zooming into fields */
  }

  .button {
    min-height: 46px;
  }

  .button.small {
    min-height: 38px;
  }

  .header-inner {
    min-height: var(--header-h);
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand-copy small {
    display: none;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .site-footer {
    display: none;
  }

  .legal-links {
    display: flex;
    padding-bottom: 8px;
  }

  .app-container {
    padding-top: 16px;
    padding-bottom: calc(92px + var(--safe-bottom));
  }

  .page-header {
    margin-bottom: 16px;
  }

  .page-header h1 {
    margin: 0 0 2px;
    font-size: 1.9rem;
  }

  .page-subtitle {
    margin: 0;
    font-size: .92rem;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .button {
    flex: 1;
  }

  .search-panel {
    margin-bottom: 16px;
    padding: 10px;
    border-radius: 16px;
    box-shadow: none;
  }

  .event-card,
  .card,
  .stat-card {
    border-radius: 16px;
    box-shadow: none;
  }

  .event-grid {
    gap: 14px;
  }

  .event-image {
    height: 128px;
  }

  .event-content {
    padding: 16px;
  }

  .event-actions .button {
    flex: 1 1 auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-toolbar select {
    width: 100%;
  }

  /* Bottom tab bar */
  .mobile-bottom-nav {
    padding: 6px 4px calc(6px + var(--safe-bottom));
    box-shadow: none;
    background: var(--white);
  }

  .mobile-bottom-nav button {
    position: relative;
    gap: 3px;
    min-height: 52px;
    padding: 6px 2px 4px;
    font-size: .68rem;
  }

  .mobile-bottom-nav svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-bottom-nav button.active {
    color: var(--blue);
  }

  .mobile-bottom-nav button.active svg {
    stroke-width: 2.3;
  }

  .mobile-bottom-nav button.active::before {
    content: "";
    position: absolute;
    top: -7px;
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--blue);
  }

  .toast-area {
    bottom: calc(80px + var(--safe-bottom));
  }

  /* Sign in */
  .auth-view {
    display: block;
    min-height: 100dvh;
    padding: 0;
    background: var(--white);
  }

  .auth-shell {
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    grid-template-rows: auto 1fr;
  }

  .auth-brand {
    padding: calc(22px + var(--safe-top)) 22px 22px;
  }

  .auth-brand h1 {
    margin: 8px 0 0;
    font-size: 1.9rem;
  }

  .auth-brand p {
    display: none;
  }

  .auth-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 14px;
    font-size: .8rem;
  }

  .auth-card {
    padding: 22px 20px calc(30px + var(--safe-bottom));
  }

  .otp-input {
    height: 54px;
  }

  /* Dialogs become bottom sheets */
  .modal {
    align-items: end;
    padding: 0;
  }

  .editor-modal-card,
  .event-modal-card,
  .dialog-card {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 22px 18px calc(22px + var(--safe-bottom));
    border-radius: 22px 22px 0 0;
    animation: sheet-up .22s ease;
  }

  .editor-modal-card.sheet {
    height: 94vh;
    height: 94dvh;
    max-height: 94vh;
    max-height: 94dvh;
    padding: 0;
  }

  .sheet-header {
    padding: 16px 18px 6px;
  }

  .sheet-body {
    padding: 0 18px 18px;
  }

  .sheet-actions {
    padding: 10px 18px calc(10px + var(--safe-bottom));
  }

  .sheet-actions .button {
    flex: 1;
  }

  .form-grid,
  .speaker-row {
    grid-template-columns: 1fr;
  }

  .modal-actions.spread {
    flex-direction: column-reverse;
  }

  .modal-actions-right {
    width: 100%;
  }

  .modal-actions-right .button {
    flex: 1;
  }

  .code-display {
    font-size: 1.9rem;
  }
}

/* Footer sits at the bottom of the screen on short pages and after the content on long ones */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

main > section {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

@media (min-width: 681px) {
  .auth-view {
    min-height: 0;
  }
}

.icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Filters: the Clear button is a tidy ghost button, not a stretched grid cell */
.clear-filters {
  gap: 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.clear-filters:hover {
  color: var(--ink);
  background: var(--surface-2);
}

@media (min-width: 681px) {
  .filter-fields .clear-filters {
    align-self: end;
    justify-self: start;
    min-height: 46px;
    padding: 0 18px;
  }
}

@media (min-width: 1001px) {
  .filter-fields {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    align-items: end;
  }
}

/* Settings: one tidy column on desktop */
@media (min-width: 681px) {
  .settings-grid {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  #account-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #account-form > .card-heading,
  #account-form > label:nth-of-type(3),
  #account-form > .account-created,
  #account-form > .form-error,
  #account-form > button {
    grid-column: 1 / -1;
  }

  #account-form > button,
  #password-form > button,
  #notification-form > button {
    justify-self: start;
  }

  .appearance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
  }

  .appearance-row .form-help {
    max-width: 340px;
    margin: 0;
  }

  .appearance-row .segmented {
    flex: none;
    width: 300px;
  }
}

.appearance-row {
  display: grid;
  gap: 14px;
}

@media (min-width: 681px) {
  .appearance-row {
    display: flex;
  }
}

/* Cancelled / past / unpublished banners */
.status-strips {
  display: grid;
}

.status-strips.rounded {
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  padding: 10px 16px;
  font-size: .85rem;
  line-height: 1.3;
}

.status-strip strong {
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.status-strip span {
  opacity: .92;
}

.status-strip.cancelled {
  color: #fff;
  background: #b42318;
}

.status-strip.past {
  color: var(--ink);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.status-strip.unpublished {
  color: #6b4300;
  background: #ffe7b3;
}

html[data-theme="dark"] .status-strip.unpublished {
  color: #ffe2a8;
  background: #5a4210;
}

.event-card.is-cancelled {
  border-color: #b42318;
}

.event-card.is-past .event-image,
.event-card.is-cancelled .event-image {
  filter: grayscale(.85);
  opacity: .8;
}

.event-card.is-cancelled h3 {
  color: var(--muted);
}

/* Event controls (My events, admin, report review) */
.action-bar {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.action-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-primary .button {
  gap: 8px;
  justify-content: center;
}

.action-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}

.action-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border: 0;
  padding: 10px 4px;
  color: var(--ink);
  background: transparent;
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}

.action-chip + .action-chip {
  border-left: 1px solid var(--line);
}

.action-chip:hover {
  background: var(--white);
}

.action-chip.danger {
  color: var(--danger);
}

.admin-item .action-bar {
  max-width: 520px;
  margin-top: 4px;
}

.review-section .action-bar {
  margin-top: 12px;
}

/* Buttons: icon + label always sit on the same centre line */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.2;
}

a.button {
  text-decoration: none;
}

.icon-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.icon-button.small {
  width: 36px;
  height: 36px;
}

.icon-button.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Search bar + clear button */
.search-box {
  min-height: 48px;
}

.search-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
  font-size: 0;
}

.search-icon .icon {
  width: 20px;
  height: 20px;
}

.clear-desktop {
  display: none;
}

@media (min-width: 681px) {
  .search-row {
    align-items: stretch;
  }

  .clear-desktop {
    display: inline-flex;
    flex: none;
    min-height: 48px;
    padding: 0 18px;
  }

  /* On desktop the Clear button lives next to the search bar */
  .filter-fields #clear-filters {
    display: none;
  }
}

@media (min-width: 1001px) {
  .filter-fields {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Profile page centred on desktop */
@media (min-width: 681px) {
  #settings-view > .page-header,
  .settings-grid {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Same footer links under every tab on phones */
.app-legal {
  margin-top: 32px;
}

@media (min-width: 681px) {
  .app-legal {
    display: none;
  }
}

/* ----- Shared pieces ----- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink);
  background: var(--surface-2);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}

.chip .icon {
  width: 14px;
  height: 14px;
}

.chip.live {
  color: var(--success);
  background: rgba(24, 118, 78, .13);
}

.chip.warn {
  color: #7a4b00;
  background: #ffe7b3;
}

.chip.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.chip.muted {
  color: var(--muted);
}

html[data-theme="dark"] .chip.warn {
  color: #ffe2a8;
  background: #5a4210;
}

.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ----- Public event cards ----- */
.event-card {
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(23, 42, 70, .13);
}

.event-card .event-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.card-top h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .9rem;
}

.meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.meta-list .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
}

.meta-list strong {
  color: var(--text);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-actions .button {
  flex: 1;
}

.card-actions .button.is-following {
  color: var(--blue);
  border-color: var(--blue);
  background: transparent;
}

.card-actions .is-following .icon {
  fill: currentColor;
}

/* ----- My events ----- */
.manage-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tabs b {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--ink);
  background: var(--surface-2);
  font-size: .72rem;
  text-align: center;
}

.tabs button.active b {
  background: var(--gold-soft);
}

.manage-list {
  display: grid;
  gap: 16px;
}

.manage-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.manage-card.is-cancelled {
  border-color: #b42318;
}

.manage-main h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.manage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: .9rem;
}

.manage-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.manage-meta .icon {
  width: 16px;
  height: 16px;
}

.manage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ----- Admin ----- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.admin-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--text);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease;
}

.admin-stat:hover {
  transform: translateY(-2px);
}

.admin-stat .stat-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--gold-soft);
}

.admin-stat strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1;
}

.admin-stat .label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.admin-stat.alert .stat-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.admin-toolbar select {
  width: auto;
  min-width: 190px;
}

.admin-table {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-table-head,
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.4fr) 130px minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.admin-table-head {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.admin-row + .admin-row {
  border-top: 1px solid var(--line);
}

.admin-row:hover {
  background: var(--surface-2);
}

.admin-cell {
  min-width: 0;
}

.cell-label {
  display: none;
}

.event-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.row-title {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.row-sub {
  color: var(--muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.row-sub.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chips-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-size: .85rem;
  font-weight: 900;
}

html[data-theme="dark"] .avatar {
  background: #2c6bed;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.person-row:first-child {
  border-top: 0;
}

.review-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.review-actions .button {
  flex: 1;
}

/* ----- Actions sheet ----- */
.actions-card {
  width: min(460px, 100%);
}

.sheet-list {
  display: grid;
  margin-top: 8px;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 13px 4px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sheet-item:first-child {
  border-top: 0;
}

.sheet-item:hover {
  background: var(--surface-2);
}

.sheet-item .icon-wrap {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-2);
}

.sheet-item strong {
  display: block;
  color: var(--ink);
}

.sheet-item small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
}

.sheet-item.danger .icon-wrap {
  color: var(--danger);
  background: var(--danger-soft);
}

.sheet-item.danger strong {
  color: var(--danger);
}

.actions-created {
  padding: 14px 4px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

/* ----- Tablet & phone ----- */
@media (max-width: 1000px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-table-head {
    display: none;
  }

  .admin-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    padding: 16px;
  }

  .admin-row > :first-child {
    grid-column: 1 / -1;
  }

  .cell-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
  }

  .actions-cell {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .actions-cell .button {
    flex: 1;
  }
}

@media (max-width: 680px) {
  .admin-stats {
    gap: 10px;
  }

  .admin-stat {
    padding: 13px;
    box-shadow: none;
  }

  .admin-stat .stat-icon {
    width: 40px;
    height: 40px;
  }

  .admin-toolbar select {
    width: 100%;
  }

  .admin-table,
  .manage-card {
    border-radius: 16px;
    box-shadow: none;
  }

  .manage-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manage-body {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .manage-actions {
    grid-column: 1 / -1;
  }

  .manage-actions .button {
    flex: 1;
  }

  .event-card:hover {
    transform: none;
    box-shadow: none;
  }
}

.manage-body {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 680px) {
  .manage-body {
    grid-template-columns: 1fr;
  }
}

.card-top {
  margin-bottom: 12px;
}

/* Filters button */
.filter-toggle {
  flex: none;
  min-height: 48px;
  padding: 0 18px;
}

.filter-toggle[aria-expanded="true"] {
  color: var(--blue);
  border-color: var(--blue);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  color: #fff;
  background: var(--blue);
  font-size: .72rem;
}

@media (min-width: 681px) {
  .filter-fields.collapsed {
    display: none;
  }
}

.button.is-following {
  color: var(--blue);
  border-color: var(--blue);
  background: transparent;
}

.is-following .icon {
  fill: currentColor;
}

/* ----- Event details popup ----- */
.event-modal-card.detail-sheet {
  position: relative;
  width: min(740px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-sheet > .modal-close {
  display: none;
}

.detail-close {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 12px 12px -52px auto;
  border: 0;
  border-radius: 50%;
  padding: 0 0 3px;
  color: #fff;
  background: rgba(10, 20, 35, .6);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.detail-hero {
  display: grid;
  place-items: center;
  height: 200px;
  background-position: center;
  background-size: cover;
}

.detail-hero.plain {
  color: rgba(255, 255, 255, .22);
  background:
    radial-gradient(circle at 82% 18%, rgba(201, 155, 59, .5), transparent 55%),
    linear-gradient(135deg, #172a46, #25497a);
}

.detail-hero.plain .icon {
  width: 72px;
  height: 72px;
  stroke-width: 1.2;
}

.detail-head {
  padding: 22px 26px 6px;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-title {
  margin: 12px 0 0;
  font-size: 2rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 26px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--cream);
}

.info-item.wide {
  grid-column: 1 / -1;
}

.info-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--ink);
  background: var(--gold-soft);
}

.info-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.info-value {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.info-value a {
  margin-left: 6px;
  font-size: .85rem;
  font-weight: 800;
}

.info-value .muted {
  color: var(--muted);
  font-weight: 600;
}

.detail-section {
  padding: 2px 26px 18px;
}

.detail-section h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.speaker-list {
  display: grid;
  gap: 12px;
}

.speaker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-report {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 4px 26px 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: .9rem;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 26px calc(14px + var(--safe-bottom));
  background: var(--white);
}

.detail-actions > .button {
  flex: 1;
}

.detail-actions .icon-button {
  height: auto;
  min-height: 46px;
}

a.icon-button {
  text-decoration: none;
}

@media (max-width: 680px) {
  .event-modal-card.detail-sheet {
    padding: 0;
  }

  .detail-hero {
    height: 160px;
  }

  .detail-head {
    padding: 18px 18px 4px;
  }

  .detail-title {
    font-size: 1.6rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    padding: 16px 18px;
  }

  .detail-section {
    padding: 2px 18px 16px;
  }

  .detail-report {
    margin: 4px 18px 18px;
  }

  .detail-actions {
    padding: 12px 18px calc(12px + var(--safe-bottom));
  }

  .link-buttons .button {
    flex: 1 1 auto;
  }
}


/* Grey profile icon (speakers, people in admin) */
.avatar {
  color: #fff;
  background: #c5cdd8;
}

.avatar .icon {
  width: 26px;
  height: 26px;
  stroke-width: 0;
}

html[data-theme="dark"] .avatar {
  color: #8da0b8;
  background: #2b3d57;
}

.person-row .button {
  margin-left: auto;
}

/* Report: quiet link, not a box */
.detail-report {
  margin: 0;
  border: 0;
  padding: 0 26px 18px;
}

.report-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 6px 0;
  color: var(--muted);
  background: transparent;
  font-size: .8rem;
  cursor: pointer;
}

.report-link .icon {
  width: 14px;
  height: 14px;
}

.report-link:hover {
  color: var(--danger);
  text-decoration: underline;
}

@media (max-width: 680px) {
  .detail-report {
    padding: 0 18px 16px;
  }
}

/* Own events in the popup: two labelled buttons */
.detail-actions > .button.quiet {
  flex: 1;
}

/* Sign-up terms line */
.legal-note {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
}

/* Following: just name, dates, host and Unfollow */
.follow-list {
  display: grid;
  gap: 12px;
}

.follow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--white);
}

.follow-main {
  flex: 1;
  min-width: 0;
}

.follow-title {
  margin-bottom: 4px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.follow-sub {
  color: var(--muted);
  font-size: .88rem;
}

/* Admin tables: fixed last column so every row lines up with the headings */
.admin-table-head,
.admin-row {
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.5fr) 120px minmax(0, 1.3fr) 150px;
  align-items: center;
}

.admin-cell,
.admin-table-head > span {
  text-align: left;
}

.chips-cell {
  align-content: center;
}

.chip.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
}

@media (max-width: 1000px) {
  .admin-row {
    grid-template-columns: 1fr 1fr;
  }
}

#confirm-message {
  white-space: pre-line;
}

.section-help {
  margin: -4px 0 14px;
}

/* ----- My events ----- */
.manage-tabs {
  margin-bottom: 20px;
}

.manage-list {
  gap: 18px;
}

.manage-card {
  border-left: 5px solid var(--line);
  transition: box-shadow .16s ease;
}

.manage-card:hover {
  box-shadow: 0 14px 34px rgba(23, 42, 70, .12);
}

.manage-card.status-live {
  border-left-color: var(--success);
}

.manage-card.status-unpublished {
  border-left-color: #d99a1c;
}

.manage-card.status-cancelled {
  border-left-color: #b42318;
}

.manage-card.status-past {
  border-left-color: #9aa7b5;
}

.manage-card.status-past .manage-main h3,
.manage-card.status-cancelled .manage-main h3 {
  color: var(--muted);
}

.manage-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 26px;
}

.manage-main {
  flex: 1;
  min-width: 0;
}

.manage-main .badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.manage-main h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.manage-meta {
  gap: 8px 24px;
  font-size: .95rem;
}

.manage-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.manage-actions .button {
  min-width: 120px;
  min-height: 46px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 44px 20px;
}

.empty-state p {
  margin: 0;
}

@media (max-width: 680px) {
  .manage-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .manage-tabs::-webkit-scrollbar {
    display: none;
  }

  .manage-tabs button {
    flex: none;
    white-space: nowrap;
  }

  .manage-list {
    gap: 14px;
  }

  .manage-body {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }

  .manage-main h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
  }

  .manage-meta {
    flex-direction: column;
    gap: 8px;
  }

  .manage-actions .button {
    flex: 1;
    min-width: 0;
  }

  .manage-actions .icon-button {
    width: 46px;
    height: 46px;
  }
}

:root {
  --link: #24476f;
  --gold-line: #c99b3b;
}

html[data-theme="dark"] {
  --link: #9dbdf0;
  --gold-line: #e0b457;
}

/* Links: calm colour, a gold underline fades in on hover. Visited and pressed links look the same. */
a {
  color: var(--link);
}

:where(a:not(.button):not(.icon-button):not(.brand)) {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color .15s ease, text-decoration-color .15s ease;
}

:where(a:not(.button):not(.icon-button):not(.brand)):hover {
  color: var(--ink);
  text-decoration-color: var(--gold-line);
}

/* Footer links share the look of the text around them */
.site-footer,
.legal-links {
  align-items: center;
  gap: 8px 26px;
}

.site-footer a,
.legal-links a {
  color: inherit;
  font-weight: inherit;
}

.site-footer a:hover,
.legal-links a:hover {
  color: var(--ink);
  text-decoration-color: var(--gold-line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}

/* Logo: shows your image, or the text mark if the image isn't there */
.brand-logo,
.auth-logo,
.loader-mark {
  overflow: hidden;
}

.logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  display: none;
}

.no-image .logo-img {
  display: none;
}

.no-image .logo-text {
  display: inline;
}

.brand-logo:not(.no-image),
.auth-logo:not(.no-image) {
	background: transparent;
}

.loader-mark:not(.no-image) {
  background: #fbfaf7;
}

/* Mobile menu: links look like the buttons */
.mobile-menu-content a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
  padding: 13px;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.mobile-menu-content a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.mobile-menu-content a .icon {
  width: 17px;
  height: 17px;
  opacity: .75;
}

.install-steps {
  display: grid;
  gap: 12px;
  margin: 6px 0 20px;
  padding-left: 22px;
  color: var(--text);
  line-height: 1.5;
}

.code-field {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
}

/* Contact link has nothing before it, so no left gap */
.info-value > a:first-child {
  margin-left: 0;
}

/* Admin Users table has an extra "Last login" column */
.admin-table.users .admin-table-head,
.admin-table.users .admin-row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 100px minmax(0, .9fr) 118px 112px;
}

.last-login {
  color: var(--text);
  font-size: .92rem;
}

@media (max-width: 1000px) {
  .admin-table.users .admin-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Web addresses: "https://" is always there; people only type the rest */
.url-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}

.url-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 107, 237, .18);
}

.url-prefix {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: .92rem;
  font-weight: 700;
  user-select: none;
}

.url-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.url-field input:focus {
  outline: 0;
  box-shadow: none;
}

/* Speakers in the editor: one tidy card each */
.speaker-row {
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--cream);
}

.speaker-title {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.speaker-row > label:last-of-type {
  grid-column: 1 / -1;
}

/* Speakers when viewing details */
.speaker {
  align-items: flex-start;
}

.speaker-name {
  color: var(--ink);
  line-height: 1.35;
}

.speaker-where {
  color: var(--muted);
  font-weight: 600;
}

.speaker-topic {
  margin-top: 3px;
  color: var(--muted);
  font-size: .9rem;
}

.speaker-topic span {
  color: var(--ink);
  font-weight: 800;
}

/* Popup info cards: only a lone last card stretches across, so no empty gap is left */
.info-item.wide {
  grid-column: auto;
}

.info-grid > .info-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Filters now include a date range, so use four columns on desktop */
@media (min-width: 1001px) {
  .filter-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Speaker cards: Name, Ecclesia and Country in one row, Topic underneath (stacked on phones) */
@media (min-width: 681px) {
  .speaker-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.date-filter {
  min-width: 0;
  grid-column: 1 / -1;
}

.date-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.date-filter-row label {
  min-width: 0;
}

.date-filter-row .custom-date-picker {
  min-width: 0;
}

/* Desktop: From and To take two columns of the filter grid, next to the other filters */
@media (min-width: 681px) {
  .date-filter {
    grid-column: span 2;
  }
}

/* Narrow phones: a little less padding so the full date fits beside the calendar icon */
@media (max-width: 680px) {
  .date-filter-row {
    gap: 10px;
  }

	.date-filter-row .date-picker-button {
	  padding-right: 8px;
	  padding-left: 10px;
	}
}
.custom-date-picker {
  position: relative;
  display: block;
  min-width: 0;
}

.custom-date-picker > input[type="hidden"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.date-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 1.25;
  text-align: left;
}

.date-picker-button:focus-visible {
  outline: 3px solid rgba(44, 107, 237, .16);
  border-color: var(--blue);
}

.date-picker-icon {
  color: var(--muted);
  font-size: .9rem;
}

.date-picker-popup {
  position: absolute;
  z-index: 100;
  top: calc(100% + 6px);
  left: 0;
  display: block;
  width: 292px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--white);
  box-shadow: var(--shadow);
}

.date-picker-header,
.date-picker-weekdays,
.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.date-picker-header {
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  margin-bottom: 12px;
  text-align: center;
}

.date-picker-header button,
.date-picker-days button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.date-picker-header button {
  font-size: 1.5rem;
  line-height: 1;
}

.date-picker-header button:hover,
.date-picker-days button:hover:not(:disabled) {
  background: var(--surface-2);
}

.date-picker-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
}

.date-picker-days button {
  cursor: pointer;
}

.date-picker-days button.selected {
  color: #fff;
  background: var(--blue);
}

.date-picker-days button.today {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.date-picker-days button:disabled {
  color: var(--muted);
  opacity: .35;
  cursor: not-allowed;
}

@media (max-width: 680px) {
  .date-picker-popup {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: calc(82px + var(--safe-bottom));
    left: 14px;
    width: auto;
  }
}

.custom-time-picker {
  position: relative;
  display: block;
}

.custom-time-picker > input[type="hidden"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.time-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--white);
  text-align: left;
}

.time-picker-button:focus-visible {
  outline: 3px solid rgba(44, 107, 237, .16);
  border-color: var(--blue);
}

.time-picker-icon {
  color: var(--muted);
}

.time-picker-popup {
  position: absolute;
  z-index: 100;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 260px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.time-picker-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.time-picker-option {
  border: 0;
  border-radius: 8px;
  padding: 9px 8px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.time-picker-option:hover,
.time-picker-option[aria-selected="true"] {
  color: var(--blue);
  background: var(--surface-2);
  font-weight: 800;
}

.event-time-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 680px) {
  .event-time-fields {
    grid-template-columns: 1fr;
  }

  .time-picker-popup {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: 260px;
  }
}

/* Address and country: side by side on desktop, stacked on phones */
.location-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
}

.location-grid label {
  min-width: 0;
}

@media (max-width: 680px) {
  .location-grid {
    grid-template-columns: 1fr;
  }
}

/* A fixed ending that can't be edited, like "https://" at the front of links */
.suffix-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}

.suffix-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 107, 237, .18);
}

.field-suffix {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--line);
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: .92rem;
  font-weight: 700;
  user-select: none;
}

.suffix-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.suffix-field input:focus {
  outline: 0;
  box-shadow: none;
}

@media (min-width: 681px) {
  .speaker-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

/* Distance filter */
.distance-filter small {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}

.distance-filter small.is-error {
  color: var(--danger);
}

.distance-filter {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.distance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
}

.distance-title {
  color: var(--ink);
  font-weight: 800;
}

.distance-slider {
  display: grid;
  gap: 6px;
}

.distance-slider input[type="range"] {
  width: 100%;
  min-height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  accent-color: var(--blue);
}

.distance-slider output {
  color: var(--ink);
  font-weight: 800;
}

.button:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.confirm-reason {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}

.confirm-reason textarea {
  width: 100%;
  resize: vertical;
}

.prefix-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}

.prefix-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 107, 237, .18);
}

.field-prefix {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: .92rem;
  font-weight: 700;
  user-select: none;
}

.prefix-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.prefix-field input:focus {
  outline: 0;
  box-shadow: none;
}

.combo {
  position: relative;
  display: block;
}

.combo-input {
  width: 100%;
  padding-right: 40px;
  text-overflow: ellipsis;
  cursor: pointer;
}

.combo-input:focus {
  cursor: text;
}

.combo-chevron {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.combo-input[aria-expanded="true"] + .combo-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.combo-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: block;
  max-height: 260px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.combo-option,
.combo-empty {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}

.combo-option {
  color: var(--text);
  cursor: pointer;
}

.combo-option.active {
  background: var(--surface-2);
}

.combo-option[aria-selected="true"] {
  color: var(--blue);
  font-weight: 800;
}

.combo-empty {
  color: var(--muted);
}

.combo-select-button {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding-right: 40px;
  color: var(--text);
  background: var(--white);
  text-align: left;
}

.combo-select-button .combo-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-select-button:focus {
  outline: 3px solid rgba(44, 107, 237, .16);
  border-color: var(--blue);
}

.simple-picker .combo-list {
  max-height: 260px;
}

.simple-picker .combo-option[aria-selected="true"] {
  color: var(--blue);
  font-weight: 800;
}

.simple-picker .combo-input {
  cursor: pointer;
}

.simple-picker .combo-input[aria-expanded="true"] {
  border-color: var(--blue);
  outline: 3px solid rgba(44, 107, 237, .16);
}

.simple-picker .combo-option[aria-selected="true"] {
  color: var(--blue);
  font-weight: 800;
}

input.field-invalid,
textarea.field-invalid,
select.field-invalid,
.date-picker-button.field-invalid,
.time-picker-button.field-invalid,
.combo-input.field-invalid,
.prefix-field.field-invalid,
.suffix-field.field-invalid {
  border-color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

input.field-invalid:focus,
textarea.field-invalid:focus,
select.field-invalid:focus,
.combo-input.field-invalid:focus {
  outline: 3px solid rgba(180, 35, 24, .18);
}

.cookie-banner{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(12px);
  z-index: 99999;
  background: #172A46;
  color: #000;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  padding: 0;
  width: min(96%, 1100px); /* fluid responsiveness */
  max-width: 1100px;
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(.2,.9,.3,1), opacity 220ms;
  will-change: transform, opacity;
}

/* Visible state */
.cookie-banner[data-visible="true"]{
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Inner layout: flexible, wraps when needed */
.cookie-content{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  flex-wrap: wrap;
}

/* Message grows to fill space, minimum comfortable width for readability */
.cookie-message{
  margin: 0;
  font-size: clamp(.88rem, 1.6vw, 1rem);
  line-height: 1.3;
  flex: 1 1 220px;
  color: #FFF;
}

/* Links */
.cookie-message a{
  color: #c99b3b;
  font-weight: bold;
  text-decoration: none;
}

.cookie-message a:hover {
  color: #d7aa4d;
  font-weight: bold;
  text-decoration: underline;
}

/* Actions: default inline, will become full width via JS when wrapped */
.cookie-actions{
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
}

/* Buttons */
.cookie-btn{
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  min-width: 88px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Primary button style */
.cookie-btn.primary{
  background: #d7aa4d;
  color: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* When JS adds .fullwidth to .cookie-actions, make it take full row */
.cookie-actions.fullwidth{
  width: 100%;
}
.cookie-actions.fullwidth .cookie-btn.primary{
  width: 100%;
}

/* Focus styles for keyboard users */
.cookie-btn:focus{
  outline: 3px solid #FFF;
  outline-offset: 2px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .cookie-banner, .cookie-banner[data-visible="true"]{
	transition: none;
	transform: translateX(-50%) translateY(0);
	opacity: 1;
	pointer-events: auto;
  }
}

/* Add the swipe-close animation below everything else */
@media (max-width: 680px) {
  .modal.swipe-closing .modal-backdrop {
    animation: backdrop-fade-out .24s ease forwards;
  }

  .modal.swipe-closing .sheet {
    animation: sheet-slide-down .24s cubic-bezier(.22, .61, .36, 1) forwards;
  }

  @keyframes sheet-slide-down {
    from {
      transform: translateY(0);
      opacity: 1;
    }

    to {
      transform: translateY(100%);
      opacity: .96;
    }
  }

  @keyframes backdrop-fade-out {
    from {
      opacity: 1;
    }

    to {
      opacity: 0;
    }
  }
}