@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --smart-lime: #d7e600;
  --smart-black: #141413;
  --smart-white: #ffffff;
  --smart-silver: #969da3;
  --smart-grey: #595959;
  
  --smart-light-green: #ace6b7;
  --smart-light-blue: #7dcfe3;
  --smart-light-red: #ea9c98;
  --smart-light-orange: #f7bf31;

  --font-thai: "LINE Seed Sans TH", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-en: "FOR smart Next", "FOR smart Sans", "Inter", Arial, sans-serif;
  --font-headline: "FOR smart Next", "Inter", Arial, sans-serif;
  --font-sans: "FOR smart Sans", "Inter", -apple-system, sans-serif;

  /* Theme mappings */
  --bg: #141413;
  --panel: #1b1b1a;
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #969da3;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #d7e600;
  --accent-strong: #c4d100;
  --danger: #ea9c98;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-thai);
  line-height: 1.5;
}

.otp-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 9%, rgba(215, 230, 0, 0.04), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(125, 207, 227, 0.04), transparent 30%),
    #141413;
  color: #fff;
  font-family: var(--font-thai);
}

.otp-page *,
.otp-page input,
.otp-page button,
.otp-page textarea,
.otp-page select {
  font-family: var(--font-thai);
}

.otp-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
}

.otp-card {
  position: relative;
  display: grid;
  width: min(100%, 390px);
  min-height: min(720px, calc(100vh - 56px));
  align-content: start;
  gap: 18px;
  overflow: hidden;
  padding: 54px 34px 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: #141413;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.otp-card {
  max-width: calc(100vw - 28px);
}

.otp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
}

.otp-card > * {
  position: relative;
  min-width: 0;
}

.otp-logo {
  display: block;
  width: min(220px, 68vw);
  height: auto;
  margin: 0 auto 6px;
}

.otp-card h1 {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.otp-subtitle {
  max-width: 280px;
  margin: -8px auto 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.75;
  text-align: center;
}

.otp-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.otp-phone-field {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.otp-phone-field:focus-within {
  border-color: rgba(24, 167, 218, 0.8);
  background: rgba(0, 0, 0, 0.48);
  box-shadow: 0 0 0 4px rgba(24, 167, 218, 0.12);
}

.otp-phone-field span {
  display: inline-flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.otp-phone-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  outline: 0;
}

.otp-phone-field input::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.otp-phone-field input:-webkit-autofill,
.otp-phone-field input:-webkit-autofill:hover,
.otp-phone-field input:-webkit-autofill:focus,
.otp-phone-field input:autofill {
  background: #080b0e !important;
  background-color: #080b0e !important;
  color: #fff !important;
  caret-color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 1000px #080b0e inset !important;
  box-shadow: 0 0 0 1000px #080b0e inset !important;
  -webkit-background-clip: padding-box !important;
  transition: background-color 9999s ease-out 0s;
}

.otp-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #159fd3, #0b82b5);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(21, 159, 211, 0.26);
}

.otp-button:hover {
  background: linear-gradient(135deg, #20b4e8, #0b82b5);
}

.otp-button:disabled,
.otp-resend:disabled {
  background: #8b8b8b;
  box-shadow: none;
  cursor: not-allowed;
}

.otp-message {
  padding: 13px 14px;
  border-radius: 6px;
  background: #18a7da;
  color: #eaf8fd;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.otp-alert {
  padding: 12px 14px;
  border: 1px solid rgba(255, 92, 92, 0.4);
  border-radius: 6px;
  background: rgba(118, 23, 23, 0.32);
  color: #ffd6d6;
  font-size: 13px;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.otp-help {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  text-align: center;
}

.otp-ref {
  justify-self: center;
  margin: -6px 0 0;
  padding: 5px 12px;
  border: 1px solid rgba(24, 167, 218, 0.28);
  border-radius: 999px;
  background: rgba(24, 167, 218, 0.12);
  color: #59caf2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.otp-digits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 10px);
  width: 100%;
  min-width: 0;
}

.otp-digit {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1.1;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 800;
  text-align: center;
  outline: 0;
}

.otp-digit:focus {
  border-color: #18a7da;
  box-shadow: 0 0 0 3px rgba(24, 167, 218, 0.18);
}

.otp-resend-form {
  display: grid;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.otp-resend {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.14);
  background: #8b8b8b;
  color: rgba(255, 255, 255, 0.9);
}

.otp-card-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 34px;
}

.otp-assurance {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
}

.otp-assurance span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(24, 167, 218, 0.14);
  color: #45c4f0;
  font-size: 11px;
  font-weight: 800;
}

.otp-assurance strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.otp-card-footer p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .otp-shell {
    padding: 0;
  }

  .otp-card {
    width: 100%;
    min-height: 100vh;
    max-width: 100vw;
    padding: 42px 22px 28px;
    border-width: 0;
    border-radius: 0;
  }

  .otp-card::before {
    background:
      linear-gradient(115deg, rgba(255, 255, 255, 0.07), transparent 34%),
      repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 14px);
  }

  .otp-logo {
    width: min(210px, 70vw);
  }

  .otp-card h1 {
    font-size: clamp(18px, 5.2vw, 21px);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .otp-subtitle {
    max-width: 300px;
  }

  .otp-card-footer {
    padding-top: 28px;
  }

  .otp-digits {
    gap: 7px;
  }

  .otp-digit {
    border-width: 1px;
    border-radius: 7px;
  }
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}

.brand {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.otp-page .button.primary.otp-button {
  border-color: #159fd3;
  background: linear-gradient(135deg, #159fd3, #0b82b5);
  color: #fff;
  box-shadow: 0 16px 34px rgba(21, 159, 211, 0.26);
}

.otp-page .button.primary.otp-button:hover {
  background: linear-gradient(135deg, #20b4e8, #0b82b5);
}

.otp-page .button.primary.otp-button:disabled {
  border-color: #8b8b8b;
  background: #8b8b8b;
  box-shadow: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.panel p {
  margin: 0 0 16px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-weight: 700;
}

input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

input[type="text"],
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--text);
  font: inherit;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.notice.success {
  border-color: #8fc7ae;
  background: #eef8f3;
}

.notice.error {
  border-color: #f0afa8;
  background: #fff3f1;
  color: var(--danger);
}

.upload-progress {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.upload-progress[hidden],
.notice[hidden],
.flow[hidden] {
  display: none;
}

.upload-progress-meta {
  display: grid;
  gap: 2px;
}

.upload-progress-meta strong {
  font-size: 14px;
}

.upload-progress-meta span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.upload-progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ef;
}

.upload-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

/* Graphic upload page */
.upload-page .upload-hero h2 {
  max-width: 720px;
}

.upload-page .upload-layout {
  grid-auto-flow: row;
}

.upload-page .upload-panel label {
  color: rgba(255, 255, 255, 0.9);
}

.upload-page .upload-panel select {
  min-height: 48px;
  padding: 10px 42px 10px 13px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  outline: 0;
}

.upload-page .upload-panel select:focus {
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.upload-page .upload-panel select option {
  background: #111518;
  color: #fff;
}

.upload-page .upload-file-input {
  min-height: 132px;
  padding: 18px;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
}

.upload-page .upload-file-input:hover {
  border-color: rgba(21, 159, 211, 0.5);
  background:
    linear-gradient(180deg, rgba(21, 159, 211, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.2);
}

.upload-page .upload-file-input::file-selector-button {
  min-height: 40px;
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(21, 159, 211, 0.42);
  border-radius: 8px;
  background: rgba(21, 159, 211, 0.14);
  color: #64d2f6;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.upload-page .upload-progress {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.upload-page .upload-progress-meta strong {
  color: rgba(255, 255, 255, 0.94);
}

.upload-page .upload-progress-meta span {
  color: rgba(255, 255, 255, 0.58);
}

.upload-page .upload-progress-track {
  background: rgba(255, 255, 255, 0.12);
}

.upload-page .upload-progress-fill {
  background: linear-gradient(90deg, #159fd3, #42c2ef);
}

.upload-page .upload-panel > .button.primary {
  width: 100%;
  min-height: 50px;
  border-color: #159fd3;
  background: linear-gradient(135deg, #159fd3, #0b82b5);
  box-shadow: 0 16px 34px rgba(21, 159, 211, 0.24);
}

.upload-page .upload-panel > .button.primary:hover {
  background: linear-gradient(135deg, #20b4e8, #0b82b5);
}

.upload-page .upload-results-panel .flow li {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.64);
  overflow-wrap: anywhere;
}

.upload-page .upload-results-panel .flow strong {
  color: rgba(255, 255, 255, 0.94);
}

.upload-page .upload-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.upload-page .upload-summary[hidden] {
  display: none;
}

.upload-page .upload-summary-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.upload-page .upload-summary-item span {
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1;
}

.upload-page .upload-summary-item small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upload-page .upload-summary-item.is-success {
  border-color: rgba(54, 211, 153, 0.28);
  background: rgba(54, 211, 153, 0.09);
}

.upload-page .upload-summary-item.is-success span {
  color: #70e5b7;
}

.upload-page .upload-summary-item.is-skipped {
  border-color: rgba(250, 190, 72, 0.28);
  background: rgba(250, 190, 72, 0.09);
}

.upload-page .upload-summary-item.is-skipped span {
  color: #fabe48;
}

.upload-page .upload-summary-item.is-failed {
  border-color: rgba(255, 92, 92, 0.28);
  background: rgba(255, 92, 92, 0.09);
}

.upload-page .upload-summary-item.is-failed span {
  color: #ff8a8a;
}

.upload-page .upload-failure-details {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 92, 92, 0.28);
  border-radius: 8px;
  background: rgba(118, 23, 23, 0.22);
}

.upload-page .upload-failure-details[hidden] {
  display: none;
}

.upload-page .upload-failure-details h3 {
  margin: 0 0 10px;
  color: #ffb1b1;
  font-size: 14px;
}

.upload-page .upload-failure-details ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-page .upload-failure-details li {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 92, 92, 0.18);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.upload-page .upload-failure-details strong {
  color: #fff;
  overflow-wrap: anywhere;
}

.upload-page .upload-failure-details span {
  color: #ffcaca;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.upload-page .notice.success {
  border-color: rgba(54, 211, 153, 0.32);
  background: rgba(16, 92, 69, 0.72);
  color: #d8fff0;
}

.upload-page .notice.error {
  border-color: rgba(255, 92, 92, 0.4);
  background: rgba(118, 23, 23, 0.72);
  color: #ffd6d6;
}

@media (max-width: 560px) {
  .upload-page .topbar {
    align-items: flex-start;
  }

  .upload-page .upload-file-input {
    min-height: 112px;
  }
}

/* Events page */
.events-page .events-hero h2 {
  max-width: 720px;
}

.events-page .events-layout {
  grid-auto-flow: row;
}

.events-page .event-form-panel label {
  color: rgba(255, 255, 255, 0.9);
}

.events-page .event-form-panel input[type="text"],
.events-page .event-form-panel select {
  min-height: 50px;
  padding: 11px 13px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  outline: 0;
}

.events-page .event-form-panel input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.events-page .event-form-panel input[type="text"]:focus,
.events-page .event-form-panel select:focus {
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.events-page .event-form-panel > .button.primary {
  width: 100%;
  min-height: 50px;
  border-color: #159fd3;
  background: linear-gradient(135deg, #159fd3, #0b82b5);
  box-shadow: 0 16px 34px rgba(21, 159, 211, 0.24);
}

.events-page .event-form-panel > .button.primary:hover {
  background: linear-gradient(135deg, #20b4e8, #0b82b5);
}

.events-page .event-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.events-page .event-list li {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.events-page .event-list li:hover,
.events-page .event-list li.is-active {
  border-color: rgba(21, 159, 211, 0.38);
  background: rgba(21, 159, 211, 0.09);
  transform: translateY(-1px);
}

.events-page .event-list li > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.events-page .event-list-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(21, 159, 211, 0.28);
  border-radius: 8px;
  background: rgba(21, 159, 211, 0.12);
  color: #64d2f6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.events-page .event-list-icon.is-atmosphere {
  border-color: rgba(54, 211, 153, 0.3);
  background: rgba(54, 211, 153, 0.12);
  color: #8df4cb;
}

.events-page .event-list-content {
  display: grid;
  min-width: 0;
}

.events-page .event-list-content strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.events-page .event-list-content small {
  color: rgba(255, 255, 255, 0.5);
}

.events-page .event-list-id {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.events-page .notice.success {
  border-color: rgba(54, 211, 153, 0.32);
  background: rgba(16, 92, 69, 0.72);
  color: #d8fff0;
}

.events-page .notice.error {
  border-color: rgba(255, 92, 92, 0.4);
  background: rgba(118, 23, 23, 0.72);
  color: #ffd6d6;
}

.events-page .event-gallery-panel {
  margin-top: 24px;
  scroll-margin-top: 20px;
}

.events-page .event-gallery-heading {
  align-items: end;
}

.events-page .event-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.profile-events-page .event-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.profile-events-page .event-edit-form .button.primary {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 150px;
}

.events-page .event-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.events-page .event-gallery-actions a {
  display: inline-grid;
  min-height: 38px;
  padding: 8px 13px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.events-page .event-gallery-actions a:hover,
.events-page .event-gallery-actions a.is-active {
  border-color: rgba(21, 159, 211, 0.44);
  background: rgba(21, 159, 211, 0.15);
  color: #b9efff;
}

.events-page .event-edit-form .field {
  margin: 0;
}

.events-page .event-edit-form label {
  color: rgba(255, 255, 255, 0.78);
}

.events-page .event-edit-form input[type="text"],
.events-page .event-edit-form select {
  min-height: 44px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.94);
  outline: 0;
}

.events-page .event-edit-form input[type="text"]:focus,
.events-page .event-edit-form select:focus {
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.profile-events-page .event-form-panel select,
.profile-events-page .event-edit-form select {
  appearance: none;
  padding-right: 40px;
  border-color: rgba(103, 217, 255, 0.22);
  background-color: rgba(8, 15, 22, 0.92);
  background-image:
    linear-gradient(45deg, transparent 50%, #8de7ff 50%),
    linear-gradient(135deg, #8de7ff 50%, transparent 50%),
    linear-gradient(to right, rgba(103, 217, 255, 0.18), rgba(103, 217, 255, 0.18));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 36px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px, 1px 24px;
  color: #f8fbff;
  color-scheme: dark;
}

.profile-events-page .event-form-panel select:hover,
.profile-events-page .event-edit-form select:hover {
  border-color: rgba(103, 217, 255, 0.38);
  background-color: rgba(11, 25, 36, 0.96);
}

.profile-events-page .event-form-panel select option,
.profile-events-page .event-edit-form select option {
  background: #111820;
  color: #f8fbff;
}

.profile-events-page .event-form-panel select option:checked,
.profile-events-page .event-edit-form select option:checked {
  background: #0b82b5;
  color: #fff;
}

.events-page .event-edit-form .button.primary {
  min-height: 44px;
  white-space: nowrap;
}

.events-page .event-customer-management {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(103, 217, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.events-page .event-customer-management .panel-heading {
  margin-bottom: 0;
}

.events-page .event-customer-management .event-edit-form {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-events-page .event-transfer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.profile-events-page .event-transfer-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-events-page .event-transfer-pane.is-in-event {
  border-color: rgba(54, 211, 153, 0.18);
  background: rgba(54, 211, 153, 0.055);
}

.profile-events-page .event-transfer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.profile-events-page .event-transfer-heading h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 900;
}

.profile-events-page .event-transfer-heading span {
  display: inline-grid;
  min-width: 28px;
  min-height: 24px;
  padding: 3px 8px;
  place-items: center;
  border: 1px solid rgba(103, 217, 255, 0.2);
  border-radius: 999px;
  background: rgba(103, 217, 255, 0.1);
  color: #9be5ff;
  font-size: 12px;
  font-weight: 900;
}

.profile-events-page .event-transfer-search {
  display: grid;
  gap: 6px;
  padding: 10px 12px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-events-page .event-transfer-search span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  font-weight: 850;
}

.profile-events-page .event-transfer-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font: inherit;
  outline: 0;
}

.profile-events-page .event-transfer-search input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.profile-events-page .event-transfer-search input:focus {
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.profile-events-page .event-transfer-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 520px;
  min-height: 430px;
  overflow: auto;
  padding: 10px;
  scrollbar-color: rgba(21, 159, 211, 0.5) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.profile-events-page .event-transfer-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.profile-events-page .event-transfer-item[hidden] {
  display: none;
}

.profile-events-page .event-transfer-item:hover {
  border-color: rgba(103, 217, 255, 0.26);
  background: rgba(103, 217, 255, 0.075);
  transform: translateY(-1px);
}

.profile-events-page .event-transfer-item input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #159fd3;
}

.profile-events-page .event-transfer-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-events-page .event-transfer-item strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-events-page .event-transfer-item small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-events-page .event-transfer-empty {
  display: grid;
  min-height: 430px;
  padding: 18px;
  place-items: center;
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  text-align: center;
}

.profile-events-page .event-transfer-no-results {
  display: grid;
  min-height: 92px;
  padding: 16px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  text-align: center;
}

.profile-events-page .event-transfer-no-results[hidden] {
  display: none;
}

.profile-events-page .event-transfer-actions {
  display: grid;
  align-self: center;
  gap: 10px;
  min-width: 132px;
}

.profile-events-page .event-transfer-actions .button {
  width: 100%;
  min-height: 42px;
  padding-inline: 12px;
  white-space: normal;
}

.profile-events-page .profile-event-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.profile-events-page .profile-event-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 8, 13, 0.72);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.profile-events-page .profile-event-modal-dialog {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  width: min(430px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 92, 92, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(27, 35, 43, 0.98), rgba(13, 18, 24, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.profile-events-page .profile-event-modal-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 92, 92, 0.38);
  border-radius: 8px;
  background: rgba(255, 92, 92, 0.13);
  color: #ffb9b9;
  font-size: 22px;
  font-weight: 900;
}

.profile-events-page .profile-event-modal-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-events-page .profile-event-modal-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-events-page .profile-event-modal-content strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-events-page .profile-event-modal-close {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 96px;
  min-height: 40px;
}

.events-page .event-gallery-kicker {
  margin-bottom: 4px;
  color: #64d2f6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.events-page .event-photo-count {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(21, 159, 211, 0.3);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.1);
  color: #9be5ff;
  font-size: 12px;
  font-weight: 800;
}

.events-page .event-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.events-page .event-photo-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.events-page .event-photo-card > a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.24);
}

.events-page .event-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.events-page .event-photo-card:hover img {
  transform: scale(1.025);
}

.events-page .event-photo-body {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
}

.events-page .event-photo-body strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.events-page .event-photo-body span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.events-page .event-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
}

.events-page .event-pagination a,
.events-page .event-pagination > span {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  padding: 8px 11px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.events-page .event-pagination a:hover,
.events-page .event-pagination .is-current {
  border-color: rgba(21, 159, 211, 0.48);
  background: rgba(21, 159, 211, 0.18);
  color: #b9efff;
}

.events-page .event-pagination .is-disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.events-page .event-pagination .event-pagination-gap {
  min-width: auto;
  border-color: transparent;
  background: transparent;
}

@media (max-width: 560px) {
  .events-page .topbar {
    align-items: flex-start;
  }

  .events-page .event-list li > a {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .events-page .event-list-id {
    grid-column: 2;
    justify-self: start;
  }

  .profile-events-page .event-list-id {
    grid-column: auto;
    justify-self: end;
  }

  .events-page .event-gallery-heading {
    align-items: flex-start;
  }

  .events-page .event-edit-form {
    grid-template-columns: 1fr;
  }

  .profile-events-page .event-transfer-form {
    grid-template-columns: 1fr;
  }

  .profile-events-page .event-transfer-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
  }

  .profile-events-page .event-transfer-list,
  .profile-events-page .event-transfer-empty {
    min-height: 220px;
  }

  .events-page .event-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.match {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.match img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef1f5;
}

.match-body {
  padding: 12px;
}

.match-title {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.match-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.eyebrow {
  margin: 0 0 3px;
  color: #6c5b2b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-page {
  background: #f2f4f1;
}

.search-shell {
  width: min(1240px, calc(100% - 32px));
}

.search-page .topbar {
  padding: 18px 0 24px;
}

.search-page .brand {
  font-size: 30px;
}

.search-page .nav a {
  border-color: #d5d9cf;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(19, 27, 31, 0.05);
}

.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid #d7ddd2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(26, 35, 40, 0.08);
}

.search-hero h2 {
  max-width: 760px;
  margin: 0 0 8px;
  color: #111827;
  font-size: 30px;
  line-height: 1.16;
}

.search-hero p {
  max-width: 760px;
  margin: 0;
  color: #5d6673;
}

.search-stats {
  display: grid;
  grid-template-columns: minmax(110px, 1fr);
  gap: 10px;
}

.search-stats div {
  min-width: 124px;
  padding: 14px 16px;
  border: 1px solid #d8dfd4;
  border-radius: 8px;
  background: #f8faf6;
}

.search-stats span {
  display: block;
  color: #12231d;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.search-stats small {
  display: block;
  margin-top: 7px;
  color: #63705f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.search-page .panel {
  border-color: #d7ddd2;
  box-shadow: 0 12px 30px rgba(26, 35, 40, 0.06);
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0 0 4px;
}

.panel-heading p {
  margin: 0;
  color: #68717d;
}

.search-uploader {
  position: sticky;
  top: 18px;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  padding: 22px;
  border: 1px dashed #9aa991;
  border-radius: 8px;
  background: #f9fbf7;
  color: #25312b;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.dropzone:hover {
  border-color: #1f7a5f;
  background: #f5faf6;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 95, 0.18);
}

.selfie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.source-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px solid #d7ddd2;
  border-radius: 8px;
  background: #ffffff;
  color: #202923;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(26, 35, 40, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.source-button:hover {
  border-color: #1f7a5f;
  box-shadow: 0 12px 24px rgba(26, 35, 40, 0.09);
  transform: translateY(-1px);
}

.source-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5c4;
  border-radius: 999px;
  background: #f8faf6;
  color: #1f7a5f;
  font-size: 20px;
  font-weight: 800;
}

.source-button strong,
.source-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-button strong {
  font-size: 14px;
}

.source-button small {
  margin-top: 2px;
  color: #6b7667;
  font-size: 12px;
  font-weight: 600;
}

.dropzone-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid #c4cdbd;
  border-radius: 999px;
  background: #ffffff;
  color: #1f7a5f;
  font-size: 28px;
  line-height: 1;
}

.dropzone-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.dropzone-subtitle {
  display: block;
  max-width: 240px;
  margin-top: 6px;
  color: #64705f;
  font-size: 13px;
  font-weight: 500;
}

.dropzone-preview {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone-preview.is-visible {
  display: block;
}

.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-note {
  min-height: 21px;
  margin: 8px 0 0;
  color: #56606d;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.search-button {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
}

.privacy-note {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #d7ddd2;
  border-radius: 8px;
  background: #fbfcf9;
}

.privacy-note strong {
  color: #222b25;
  font-size: 13px;
}

.privacy-note span {
  color: #657061;
  font-size: 13px;
}

.results-panel {
  min-height: 430px;
}

.results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.result-count,
.similarity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(21, 159, 211, 0.28);
  border-radius: 999px;
  background: #edf8fd;
  color: #0b6f9d;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.premium-gallery {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.premium-match {
  border-color: #d8ded4;
  box-shadow: 0 10px 24px rgba(26, 35, 40, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.premium-match:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(26, 35, 40, 0.12);
}

.match-media {
  position: relative;
  background: #eef2ea;
}

.match-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.match-media .similarity-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  box-shadow: 0 8px 18px rgba(18, 24, 28, 0.15);
}

.premium-match .match-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.premium-match .match-title {
  margin: 0;
  color: #18201b;
  font-size: 15px;
}

.match-details {
  display: grid;
  gap: 2px;
}

.match-details span {
  color: #747e6f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.match-details strong {
  color: #2d352f;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.premium-empty {
  display: grid;
  gap: 6px;
  min-height: 280px;
  place-content: center;
  background: #fbfcf9;
}

.premium-empty strong {
  color: #202923;
  font-size: 18px;
}

.premium-empty span {
  color: #68717d;
}

@media (max-width: 760px) {
  .topbar,
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .search-hero,
  .search-layout {
    grid-template-columns: 1fr;
  }

  .search-hero {
    padding: 20px;
  }

  .search-hero h2 {
    font-size: 24px;
  }

  .search-stats {
    grid-template-columns: 1fr 1fr;
  }

  .search-uploader {
    position: static;
  }

  .selfie-actions {
    grid-template-columns: 1fr;
  }

  .results-heading {
    display: grid;
  }
}

/* Event calendar */
.event-calendar-page .event-calendar-hero h2 {
  max-width: 720px;
}

.event-calendar-panel {
  margin-top: 22px;
  padding: clamp(14px, 2vw, 24px);
  overflow: hidden;
}

.event-calendar-toolbar {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid rgba(103, 217, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.event-calendar-toolbar > div {
  text-align: center;
}

.event-calendar-toolbar p,
.event-calendar-toolbar h2 {
  margin: 0;
}

.event-calendar-toolbar p {
  color: #67d9ff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.event-calendar-toolbar h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.event-calendar-toolbar > a:last-child {
  justify-self: end;
}

.event-calendar-toolbar > .button {
  width: 140px;
  min-height: 42px;
  justify-content: center;
}

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

.event-calendar-weekdays {
  border: 1px solid rgba(103, 217, 255, 0.16);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: rgba(103, 217, 255, 0.055);
}

.event-calendar-weekdays span {
  padding: 10px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-calendar-grid {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.event-calendar-day {
  min-width: 0;
  min-height: 148px;
  padding: 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.event-calendar-day.is-outside {
  background: rgba(0, 0, 0, 0.12);
  opacity: 0.46;
}

.event-calendar-day > header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.event-calendar-day > header strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.8rem;
}

.event-calendar-day.is-today > header strong {
  background: #159fd3;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.15);
}

.event-calendar-mobile-weekday {
  display: none;
}

.event-calendar-day-events {
  display: grid;
  gap: 6px;
}

.event-calendar-event {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(103, 217, 255, 0.2);
  border-left: 3px solid #67d9ff;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(21, 159, 211, 0.2), rgba(21, 159, 211, 0.07));
  color: #fff;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.event-calendar-event:hover,
.event-calendar-event:focus-visible {
  border-color: rgba(103, 217, 255, 0.62);
  outline: none;
  background: rgba(21, 159, 211, 0.28);
  transform: translateY(-1px);
}

.event-calendar-event strong,
.event-calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-calendar-event strong {
  font-size: 0.76rem;
}

.event-calendar-event small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.65rem;
}

@media (max-width: 760px) {
  .event-calendar-toolbar {
    grid-template-columns: 84px minmax(0, 1fr) 84px;
    gap: 8px;
    padding: 8px;
  }

  .event-calendar-toolbar .button {
    width: 84px;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 0.72rem;
  }

  .event-calendar-toolbar h2 {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
  }

  .event-calendar-weekdays {
    display: none;
  }

  .event-calendar-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    border: 0;
  }

  .event-calendar-day {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 72px;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
  }

  .event-calendar-day.is-outside:not(.is-today) {
    display: none;
  }

  .event-calendar-day > header {
    display: grid;
    align-content: start;
    justify-items: center;
    margin: 0;
  }

  .event-calendar-mobile-weekday {
    display: block;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .event-calendar-day > header strong {
    font-size: 1rem;
  }
}

/* Premium Search Selfie experience */
.search-page {
  --search-ink: #161616;
  --search-soft: #656a70;
  --search-line: rgba(32, 34, 36, 0.12);
  --search-panel: rgba(255, 255, 255, 0.88);
  --search-green: #159fd3;
  --search-green-strong: #0b82b5;
  --search-gold: #6f7a86;
  --search-mist: #e9f2ee;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(12, 15, 18, 0.08), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(21, 159, 211, 0.06), transparent 30%),
    #eef1f4;
  color: var(--search-ink);
  font-family: "Noto Sans Thai", Arial, Helvetica, sans-serif;
}

.search-page *,
.search-page input,
.search-page button,
.search-page textarea,
.search-page select {
  font-family: "Noto Sans Thai", Arial, Helvetica, sans-serif;
}

.search-shell {
  width: min(1280px, calc(100% - 40px));
  padding: 30px 0 54px;
}

.search-page .topbar {
  align-items: center;
  padding: 6px 0 22px;
}

.search-page .brand {
  color: #111;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.search-page .eyebrow {
  color: #5b6470;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.search-nav {
  justify-content: flex-end;
}

.search-nav a {
  border-color: rgba(17, 17, 17, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: #252525;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(24, 28, 33, 0.08);
}

.search-nav a:hover {
  border-color: rgba(21, 159, 211, 0.36);
  color: var(--search-green-strong);
}

.search-page .notice {
  border: 1px solid rgba(180, 35, 24, 0.22);
  box-shadow: 0 16px 34px rgba(41, 32, 24, 0.08);
}

.search-hero {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  align-items: stretch;
  gap: 28px;
  margin-bottom: 22px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(3, 5, 6, 0.96), rgba(9, 12, 14, 0.94)),
    linear-gradient(135deg, rgba(17, 20, 23, 0.98), rgba(0, 0, 0, 0.92));
  box-shadow: 0 26px 70px rgba(5, 7, 9, 0.28);
}

.search-hero::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px);
}

.search-hero > * {
  position: relative;
}

.hero-logo {
  display: block;
  width: min(190px, 44vw);
  height: auto;
  margin: 0 0 22px;
  object-fit: contain;
}

.hero-kicker {
  margin: 0 0 12px;
  color: #169fd4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-hero h2 {
  max-width: 840px;
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.98;
}

.search-hero p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-pills span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(16px);
}

.search-stats {
  align-self: end;
  grid-template-columns: 1fr;
  gap: 12px;
}

.search-stats div {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.search-stats span {
  color: #fff;
  font-size: clamp(30px, 4vw, 42px);
}

.search-stats small {
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: 0.08em;
}

.search-layout {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 22px;
}

.search-page .panel {
  border: 1px solid var(--search-line);
  background: var(--search-panel);
  box-shadow: 0 22px 54px rgba(38, 42, 40, 0.12);
  backdrop-filter: blur(18px);
}

.panel-heading h2 {
  color: #151515;
  font-size: 22px;
}

.panel-heading p {
  color: var(--search-soft);
}

.search-uploader {
  top: 22px;
  padding: 22px;
}

.selfie-actions {
  gap: 12px;
}

.selfie-actions.single-action {
  grid-template-columns: 1fr;
}

.source-button {
  appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
  min-height: 78px;
  border-color: rgba(22, 22, 22, 0.1);
  background: linear-gradient(180deg, #ffffff, #f8faf8);
  box-shadow: 0 14px 26px rgba(21, 28, 24, 0.08);
}

.source-button:hover {
  border-color: rgba(21, 159, 211, 0.45);
  box-shadow: 0 18px 34px rgba(10, 18, 24, 0.12);
}

.source-button.is-guided {
  position: relative;
  overflow: visible;
  border-color: rgba(21, 159, 211, 0.62);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.12), 0 18px 34px rgba(21, 159, 211, 0.14);
  animation: cameraGuidePulse 1.45s ease-in-out infinite;
}

.source-button.is-guided::after,
.search-button.is-guided::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 20px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.34);
  transform: scale(0.4);
  opacity: 0;
  animation: cameraButtonRipple 1.15s ease-out infinite;
}

.source-button.is-guided::before,
.search-button.is-guided::before {
  content: "\1F447";
  position: absolute;
  right: 18px;
  top: -36px;
  z-index: 3;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(10, 18, 24, 0.12);
  animation: cameraFingerTap 900ms ease-in-out infinite;
}

.search-button.is-guided {
  position: relative;
  overflow: visible;
  animation: searchButtonReveal 240ms ease-out both, cameraGuidePulse 1.45s ease-in-out infinite 240ms;
}

.search-button.is-guided::before {
  right: 18px;
  top: -42px;
}

.search-button.is-guided::after {
  right: 32px;
  top: 12px;
}

.search-button.is-search-hint {
  position: relative;
  overflow: visible;
}

.search-button.is-search-hint::before {
  content: "\1F447";
  position: absolute;
  right: 18px;
  top: -42px;
  z-index: 3;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  font-size: 27px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(10, 18, 24, 0.16);
  animation: searchHintFinger 1.05s ease-in-out infinite;
}

@keyframes searchHintFinger {
  0%, 100% {
    transform: translateY(-3px);
  }

  50% {
    transform: translateY(5px);
  }
}

@keyframes cameraFingerTap {
  0%, 100% {
    transform: translateY(-6px) scale(1);
  }

  50% {
    transform: translateY(7px) scale(0.94);
  }
}

@keyframes cameraButtonRipple {
  0% {
    opacity: 0.72;
    transform: scale(0.35);
  }

  80%, 100% {
    opacity: 0;
    transform: scale(2.9);
  }
}

@keyframes cameraGuidePulse {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes searchButtonReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.source-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(21, 159, 211, 0.28);
  background: #edf8fd;
  color: var(--search-green-strong);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.source-button strong {
  color: #171717;
}

.source-button small {
  color: #686d72;
}

.dropzone {
  min-height: 310px;
  border: 1px solid rgba(20, 33, 42, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(241, 244, 246, 0.92)),
    #eef2f4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 18px 36px rgba(22, 34, 28, 0.08);
}

.dropzone[hidden] {
  display: none;
}

.dropzone:hover {
  border-color: rgba(21, 159, 211, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(236, 246, 251, 0.96)),
    #eef7fb;
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  border-color: rgba(21, 159, 211, 0.28);
  background: #edf8fd;
  color: #0b82b5;
  font-size: 30px;
}

.dropzone-title {
  color: #171717;
  font-size: 20px;
}

.dropzone-subtitle {
  color: #68706b;
}

.dropzone-preview.is-visible {
  display: block;
  z-index: 1;
}

.camera-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(20, 33, 42, 0.12);
  border-radius: 8px;
  background: #f7f9fa;
  box-shadow: 0 14px 28px rgba(18, 24, 28, 0.08);
}

.camera-panel[hidden] {
  display: none;
}

.camera-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #050607;
  object-fit: cover;
}

.camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.file-note {
  color: #5f656b;
}

.search-button {
  min-height: 52px;
  border: 0;
  background: linear-gradient(135deg, var(--search-green), var(--search-green-strong));
  box-shadow: 0 16px 30px rgba(21, 159, 211, 0.25);
  scroll-margin: 18px;
}

.search-button[hidden] {
  display: none;
}

.search-button:hover {
  background: linear-gradient(135deg, #20b4e8, var(--search-green-strong));
}

.search-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.search-page .button.ghost {
  border-color: rgba(22, 22, 22, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: #252b2a;
  box-shadow: 0 10px 22px rgba(25, 31, 29, 0.07);
}

.search-page .button.primary {
  border-color: var(--search-green);
  background: linear-gradient(135deg, var(--search-green), var(--search-green-strong));
  color: #fff;
  box-shadow: 0 16px 30px rgba(21, 159, 211, 0.25);
}

.search-page .button.primary:hover {
  background: linear-gradient(135deg, #20b4e8, var(--search-green-strong));
}

.search-page .button.ghost:hover {
  border-color: rgba(21, 159, 211, 0.34);
  color: var(--search-green-strong);
}

.search-page .button.compact {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}

.search-page .button:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

.privacy-note {
  border-color: rgba(20, 33, 42, 0.12);
  background: #f6f8f9;
}

.results-panel {
  min-height: 510px;
  padding: 22px;
}

.mobile-results-stats {
  display: none;
}

.result-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid rgba(20, 33, 42, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(235, 241, 238, 0.88)),
    rgba(235, 241, 238, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 10px 24px rgba(24, 31, 29, 0.08);
}

.result-mode-tab {
  position: relative;
  isolation: isolate;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(20, 33, 42, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.56);
  color: #5f6669;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(24, 31, 29, 0.06);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.result-mode-tab::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 7px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 150ms ease, transform 150ms ease;
}

.result-mode-tab:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(21, 159, 211, 0.28);
  background: rgba(255, 255, 255, 0.86);
  color: var(--search-green-strong);
  box-shadow: 0 10px 20px rgba(24, 31, 29, 0.1);
}

.result-mode-tab:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(24, 31, 29, 0.08);
}

.result-mode-tab.is-active {
  border-color: rgba(21, 159, 211, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 248, 253, 0.96)),
    #fff;
  color: var(--search-green-strong);
  box-shadow: 0 12px 22px rgba(21, 159, 211, 0.16);
}

.result-mode-tab.is-active::after {
  opacity: 0.95;
  transform: scaleX(1);
}

.result-mode-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.result-mode-tab:focus-visible {
  outline: 2px solid rgba(21, 159, 211, 0.48);
  outline-offset: 3px;
}

.result-mode-panel[hidden] {
  display: none;
}

.results-heading {
  padding-bottom: 6px;
}

.atmosphere-browser {
  display: grid;
  gap: 14px;
  align-items: start;
}

.atmosphere-event-picker {
  display: grid;
  gap: 7px;
  max-width: 520px;
}

.atmosphere-event-picker label {
  color: #666d70;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.atmosphere-event-combobox {
  position: relative;
}

.atmosphere-event-select {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 58px;
  padding: 10px 44px 10px 13px;
  border: 1px solid rgba(20, 33, 42, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(45deg, transparent 50%, #667078 50%) calc(100% - 20px) 25px / 7px 7px no-repeat,
    linear-gradient(135deg, #667078 50%, transparent 50%) calc(100% - 15px) 25px / 7px 7px no-repeat,
    #fff;
  color: #151515;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.atmosphere-event-select span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atmosphere-event-select small {
  color: #667078;
  font-size: 12px;
  font-weight: 800;
}

.atmosphere-event-select:focus-visible,
.atmosphere-event-select[aria-expanded="true"] {
  border-color: rgba(21, 159, 211, 0.58);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.atmosphere-event-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  gap: 6px;
  max-height: min(340px, 54vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(20, 33, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(13, 18, 24, 0.18);
}

.atmosphere-event-menu[hidden] {
  display: none;
}

.atmosphere-event-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #151515;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.atmosphere-event-option strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atmosphere-event-option span {
  color: #667078;
  font-size: 12px;
  font-weight: 800;
}

.atmosphere-event-option:hover,
.atmosphere-event-option.is-active {
  border-color: rgba(21, 159, 211, 0.28);
  background: #edf8fd;
}

.atmosphere-stage {
  min-width: 0;
}

.atmosphere-content-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.atmosphere-content-heading h3 {
  margin: 0;
  color: #151515;
  font-size: 18px;
}

.atmosphere-content-heading p {
  margin: 2px 0 0;
  color: #666d70;
  font-size: 13px;
}

.atmosphere-content-heading > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf8fd;
  color: #0b6f9d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.atmosphere-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.atmosphere-pagination > span {
  color: #666d70;
  font-size: 13px;
  font-weight: 800;
}

.atmosphere-gallery {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.atmosphere-match .match-media img {
  aspect-ratio: 1 / 1;
}

.atmosphere-match .match-body {
  padding: 10px;
}

.atmosphere-match .match-download {
  min-height: 34px;
  margin-top: 0;
  padding: 7px 8px;
  font-size: 12px;
}

.download-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(20, 33, 42, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 249, 0.92)),
    #fff;
  box-shadow: 0 16px 32px rgba(30, 38, 35, 0.08);
}

.download-toolbar-meta {
  display: grid;
  gap: 2px;
}

.download-toolbar-meta strong {
  color: #151515;
  font-size: 15px;
}

.download-toolbar-meta span,
.download-status {
  color: #666d70;
  font-size: 13px;
}

.download-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-height: 38px;
  padding: 3px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 8px;
  background: rgba(235, 241, 238, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.view-toggle-button {
  min-width: 78px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f6669;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.view-toggle-button.is-active {
  background: #fff;
  color: var(--search-green-strong);
  box-shadow: 0 8px 16px rgba(24, 31, 29, 0.11);
}

.view-toggle-button:focus-visible {
  outline: 2px solid rgba(21, 159, 211, 0.42);
  outline-offset: 2px;
}

.download-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
}

.mobile-download-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(21, 159, 211, 0.18);
  border-radius: 8px;
  background: #f2f9fd;
}

.mobile-download-panel[hidden] {
  display: none;
}

.mobile-download-panel strong {
  color: #151515;
  font-size: 14px;
}

.mobile-download-panel span {
  color: #626a70;
  font-size: 13px;
}

.mobile-download-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.mobile-download-item {
  min-height: 38px;
  border: 1px solid rgba(21, 159, 211, 0.26);
  border-radius: 8px;
  background: #fff;
  color: #0b82b5;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-download-item.is-downloaded {
  border-color: rgba(20, 33, 42, 0.12);
  background: #edf1f3;
  color: #687078;
}

.result-count,
.similarity-badge {
  border-color: rgba(21, 159, 211, 0.3);
  background: #edf8fd;
  color: #0b6f9d;
  box-shadow: 0 10px 20px rgba(21, 159, 211, 0.1);
}

.premium-gallery {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.premium-gallery.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.premium-match {
  overflow: hidden;
  border-color: rgba(22, 22, 22, 0.1);
  background: #fff;
  box-shadow: 0 18px 38px rgba(34, 39, 37, 0.12);
}

.selectable-match {
  position: relative;
}

.selectable-match.is-selected {
  border-color: rgba(21, 159, 211, 0.54);
  box-shadow: 0 22px 48px rgba(21, 159, 211, 0.15);
}

.selectable-match.is-selected .match-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(21, 159, 211, 0.78);
}

.premium-match:hover {
  box-shadow: 0 24px 50px rgba(24, 29, 27, 0.17);
}

.match-media {
  position: relative;
  background: linear-gradient(135deg, #eff3ef, #f8f5ee);
}

.match-media img {
  aspect-ratio: 5 / 4;
}

.premium-gallery.is-compact .match-media img {
  aspect-ratio: 1 / 1;
}

.match-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(17, 21, 20, 0.66);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 24px rgba(17, 21, 20, 0.18);
}

.match-checkbox {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--search-green);
}

.match-download {
  width: 100%;
  min-height: 40px;
  margin-top: 2px;
}

.premium-match .match-body {
  gap: 12px;
  padding: 15px;
}

.premium-gallery.is-compact .premium-match .match-body {
  gap: 8px;
  padding: 10px;
}

.premium-match .match-title {
  color: #151515;
  font-size: 16px;
}

.premium-gallery.is-compact .premium-match .match-title {
  display: none;
}

.match-details span {
  color: #81856f;
  letter-spacing: 0.08em;
}

.match-details strong {
  color: #2b2d2f;
}

.premium-gallery.is-compact .match-details {
  display: none;
}

.premium-gallery.is-compact .match-select {
  top: 7px;
  left: 7px;
  min-height: 30px;
  padding: 5px 8px;
}

.premium-gallery.is-compact .match-select span {
  display: none;
}

.premium-gallery.is-compact .similarity-badge {
  right: 7px;
  bottom: 7px;
  min-height: 24px;
  padding: 4px 7px;
  font-size: 11px;
}

.premium-gallery.is-compact .match-download {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.premium-empty {
  min-height: 330px;
  border-color: rgba(20, 33, 42, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 249, 0.92)),
    #fff;
}

@media (max-width: 900px) {
  .search-page .topbar {
    display: grid;
    gap: 16px;
  }

  .search-nav {
    justify-content: flex-start;
  }

  .search-hero,
  .search-layout {
    grid-template-columns: 1fr;
  }

  .search-stats {
    grid-template-columns: 1fr;
  }

  .search-uploader {
    position: static;
  }
}

@media (max-width: 560px) {
  .search-shell {
    width: min(100% - 24px, 1280px);
    padding-top: 18px;
  }

  .search-page .brand {
    font-size: 30px;
  }

  .search-nav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .search-nav a {
    width: 100%;
  }

  .search-hero {
    gap: 22px;
    padding: 22px;
  }

  .search-hero h2 {
    font-size: 28px;
  }

  .hero-logo {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-kicker,
  .search-hero h2 {
    text-align: center;
  }

  .search-hero p {
    max-width: 310px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.78);
  }

  .hero-pills {
    margin-top: 18px;
  }

  .search-stats {
    grid-template-columns: 1fr;
  }

  .search-hero .search-stats {
    display: none;
  }

  .mobile-results-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .mobile-results-stats div {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(20, 33, 42, 0.12);
    border-radius: 8px;
    background: #f7f9fa;
  }

  .mobile-results-stats span {
    display: block;
    color: #151515;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
  }

  .mobile-results-stats small {
    display: block;
    margin-top: 7px;
    color: #667078;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .search-page .panel,
  .search-uploader,
  .results-panel {
    padding: 20px;
  }

  .search-page .search-layout {
    gap: 22px;
  }

  .source-button.is-guided::before {
    content: "\1F447";
    position: absolute;
    right: 18px;
    top: -36px;
    z-index: 3;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    font-size: 28px;
    line-height: 1;
    box-shadow: 0 12px 24px rgba(10, 18, 24, 0.16);
    animation: cameraFingerTap 900ms ease-in-out infinite;
  }

  .source-button.is-guided .source-icon {
    box-shadow: 0 0 0 6px rgba(21, 159, 211, 0.1);
  }

  .source-button.is-guided::after {
    right: 30px;
    top: 20px;
    bottom: auto;
  }

  .search-button.is-guided::before {
    right: 14px;
    top: -40px;
  }

  .search-button.is-guided::after {
    right: 28px;
    top: 14px;
  }

  .download-toolbar {
    grid-template-columns: 1fr;
  }

  .result-mode-tabs {
    grid-template-columns: 1fr;
  }

  .atmosphere-event-picker {
    max-width: none;
  }

  .download-toolbar-meta,
  #selectAllMatches,
  #clearSelectedMatches,
  #downloadSelectedMatches,
  .download-status,
  .mobile-download-panel,
  .match-select {
    display: none;
  }

  .download-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .view-toggle {
    grid-column: auto;
  }

  .download-toolbar-actions .button {
    width: 100%;
  }

  .dropzone {
    min-height: 260px;
  }

  .premium-gallery {
    grid-template-columns: 1fr;
  }

  .premium-gallery.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .atmosphere-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Dark premium search panels */
.search-page .search-uploader,
.search-page .results-panel {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.055), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(13, 16, 18, 0.96), rgba(5, 6, 7, 0.98)),
    #07090a;
  color: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  border-radius: 8px;
  position: relative;
  overflow: visible;
}

.search-page .search-layout {
  gap: 26px;
}

.search-page .search-uploader,
.search-page .results-panel {
  padding: 24px;
}

.search-page .panel-heading,
.search-page .results-heading {
  margin-bottom: 22px;
}

.search-page .panel-heading h2,
.search-page .results-heading h2 {
  color: rgba(255, 255, 255, 0.94);
}

.search-page .panel-heading p,
.search-page .results-heading p,
.search-page .file-note {
  color: rgba(255, 255, 255, 0.62);
}

.search-page .source-button {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.search-page .source-button:hover,
.search-page .source-button.is-guided {
  border-color: rgba(21, 159, 211, 0.58);
  background: rgba(21, 159, 211, 0.1);
}

.search-page .source-button strong {
  color: rgba(255, 255, 255, 0.94);
}

.search-page .search-uploader.is-searching {
  border-color: rgba(103, 217, 255, 0.28);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(103, 217, 255, 0.1);
}

.search-page .search-uploader.is-searching .search-button {
  cursor: progress;
  opacity: 0.82;
}

.search-page .source-button small {
  color: rgba(255, 255, 255, 0.62);
}

.search-page .source-icon,
.search-page .dropzone-icon {
  border-color: rgba(21, 159, 211, 0.28);
  background: rgba(21, 159, 211, 0.12);
  color: #42c2ef;
}

.search-page .dropzone,
.search-page .camera-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.18);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 36px rgba(0, 0, 0, 0.18);
}

.search-page .dropzone:hover {
  border-color: rgba(21, 159, 211, 0.48);
  background:
    linear-gradient(180deg, rgba(21, 159, 211, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.2);
}

.search-page .dropzone-title {
  color: rgba(255, 255, 255, 0.92);
}

.search-page .dropzone-subtitle {
  color: rgba(255, 255, 255, 0.56);
}

.search-page .download-toolbar,
.search-page .mobile-download-panel,
.search-page .premium-empty,
.search-page .mobile-results-stats div,
.search-page .result-mode-tabs {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.search-page .result-mode-tabs {
  border-color: rgba(103, 217, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.22);
}

.search-page .result-mode-tab {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.search-page .result-mode-tab:hover:not(:disabled) {
  border-color: rgba(103, 217, 255, 0.28);
  background: rgba(103, 217, 255, 0.1);
  color: #bdefff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.search-page .result-mode-tab.is-active {
  border-color: rgba(103, 217, 255, 0.44);
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.28), rgba(21, 159, 211, 0.18)),
    rgba(21, 159, 211, 0.16);
  color: #e4faff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 28px rgba(21, 159, 211, 0.2);
}

.search-page .result-mode-tab:disabled {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.34);
}

.search-page .download-toolbar-meta strong,
.search-page .premium-empty strong,
.search-page .mobile-results-stats span {
  color: rgba(255, 255, 255, 0.94);
}

.search-page .download-toolbar-meta span,
.search-page .download-status,
.search-page .premium-empty span,
.search-page .mobile-results-stats small {
  color: rgba(255, 255, 255, 0.58);
}

.search-page .view-toggle {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.24);
}

.search-page .view-toggle-button {
  color: rgba(255, 255, 255, 0.58);
}

.search-page .view-toggle-button.is-active {
  background: rgba(21, 159, 211, 0.16);
  color: #64d2f6;
}

.search-page .premium-match {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.search-page .premium-match .match-title,
.search-page .match-details strong {
  color: rgba(255, 255, 255, 0.9);
}

.search-page .match-details span {
  color: rgba(255, 255, 255, 0.5);
}

.search-page .match-download,
.search-page .button.ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.search-page .atmosphere-event-picker label {
  color: rgba(255, 255, 255, 0.58);
}

.search-page .atmosphere-event-select {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(45deg, transparent 50%, #64d2f6 50%) calc(100% - 20px) 25px / 7px 7px no-repeat,
    linear-gradient(135deg, #64d2f6 50%, transparent 50%) calc(100% - 15px) 25px / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.065);
  color: #fff;
}

.search-page .atmosphere-event-select small,
.search-page .atmosphere-event-option span {
  color: rgba(255, 255, 255, 0.58);
}

.search-page .atmosphere-event-select:focus-visible,
.search-page .atmosphere-event-select[aria-expanded="true"] {
  border-color: rgba(103, 217, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.search-page .atmosphere-event-menu {
  border-color: rgba(103, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.12), transparent 34%),
    rgba(12, 15, 17, 0.98);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
}

.search-page .atmosphere-event-option {
  color: #fff;
}

.search-page .atmosphere-event-option:hover,
.search-page .atmosphere-event-option.is-active {
  border-color: rgba(103, 217, 255, 0.28);
  background: rgba(21, 159, 211, 0.16);
}

.search-page .atmosphere-content-heading h3 {
  color: rgba(255, 255, 255, 0.94);
}

.search-page .atmosphere-content-heading p,
.search-page .atmosphere-pagination > span {
  color: rgba(255, 255, 255, 0.58);
}

.search-page .atmosphere-content-heading > span {
  background: rgba(21, 159, 211, 0.16);
  color: #64d2f6;
}

@media (min-width: 901px) {
  .search-page .download-toolbar {
    grid-template-columns: minmax(0, 1fr) 112px 112px minmax(154px, 174px);
    gap: 10px;
    align-items: center;
    padding: 16px;
    border-color: rgba(103, 217, 255, 0.16);
    background:
      linear-gradient(135deg, rgba(103, 217, 255, 0.1), transparent 36%),
      rgba(255, 255, 255, 0.065);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 34px rgba(0, 0, 0, 0.2);
  }

  .search-page .download-toolbar-meta {
    grid-column: 1;
    grid-row: 1;
    align-content: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
  }

  .search-page .download-toolbar-meta strong {
    color: #67d9ff;
    font-size: 16px;
  }

  .search-page .download-toolbar-actions {
    display: contents;
  }

  .search-page .download-toolbar-actions .button,
  .search-page .view-toggle {
    min-height: 44px;
  }

  .search-page .download-toolbar-actions .button {
    min-width: 0;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 900;
    white-space: nowrap;
  }

  .search-page #selectAllMatches {
    grid-column: 2;
    grid-row: 1;
  }

  .search-page #clearSelectedMatches {
    grid-column: 3;
    grid-row: 1;
  }

  .search-page .download-toolbar-actions #downloadSelectedMatches {
    grid-column: 4;
    grid-row: 1;
    min-width: 0;
  }

  .search-page #downloadSelectedMatches {
    border-color: rgba(103, 217, 255, 0.38);
    background: linear-gradient(135deg, #159fd3, #0b82b5);
    box-shadow: 0 10px 20px rgba(21, 159, 211, 0.18);
  }

  .search-page .view-toggle {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    padding: 4px;
    border-color: rgba(103, 217, 255, 0.18);
    background: rgba(0, 0, 0, 0.28);
  }

  .search-page .view-toggle-button {
    min-width: 0;
    border-radius: 6px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .search-page .view-toggle-button.is-active {
    background: linear-gradient(135deg, rgba(103, 217, 255, 0.24), rgba(21, 159, 211, 0.16));
    color: #d8f6ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(0, 0, 0, 0.18);
  }

  .search-page .download-status {
    grid-column: 1 / -1;
    grid-row: 3;
    padding-left: 2px;
  }

  .search-page .mobile-download-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .search-page .search-layout {
    gap: 22px;
  }

  .search-page .search-uploader,
  .search-page .results-panel {
    padding: 20px;
  }
}

/* Final search layout alignment */
.search-page .search-layout {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  grid-auto-flow: column;
  align-items: start;
  column-gap: 28px;
  row-gap: 28px;
}

.search-page .search-uploader,
.search-page .results-panel {
  width: 100%;
  align-self: start;
  margin-top: 0 !important;
}

.search-page .search-uploader {
  position: static;
  top: auto;
}

.search-page .results-panel {
  min-width: 0;
}

.search-page .search-layout.is-waiting-search {
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  justify-content: stretch;
}

@media (max-width: 900px) {
  .search-page .search-layout {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    row-gap: 22px;
  }

  .search-page .results-panel {
    margin-top: 0;
  }

  .search-page .search-layout.is-waiting-search {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .search-page .search-layout {
    row-gap: 18px;
  }

  .search-page .search-uploader + .results-panel {
    margin-top: 0 !important;
  }

  .search-page .search-uploader {
    text-align: center;
  }

  .search-page .search-uploader .panel-heading p {
    margin-right: auto;
    margin-left: auto;
  }

  .search-page .search-uploader .field,
  .search-page .search-uploader .source-button,
  .search-page .search-uploader .file-note,
  .search-page .search-uploader #conversionStatus {
    text-align: left;
  }

  .search-page .results-heading {
    text-align: center;
  }

  .search-page .results-heading p {
    margin-right: auto;
    margin-left: auto;
  }
}

/* Final premium polish */
.otp-page .otp-digit {
  background: #fbfcfd;
  color: #161616;
  caret-color: #161616;
  -webkit-text-fill-color: #161616;
  opacity: 1;
}

.otp-page .otp-digit:focus {
  background: #fff;
  color: #161616;
  -webkit-text-fill-color: #161616;
  transform: translateY(-1px);
}

.otp-page .otp-digit:-webkit-autofill,
.otp-page .otp-digit:-webkit-autofill:hover,
.otp-page .otp-digit:-webkit-autofill:focus {
  -webkit-text-fill-color: #161616;
  box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(24, 167, 218, 0.18);
  transition: background-color 9999s ease-out 0s;
}

.otp-resend {
  --cooldown-progress: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.otp-resend::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: calc(var(--cooldown-progress) * 100%);
  background: rgba(24, 167, 218, 0.26);
  transition: width 260ms ease;
}

.otp-resend {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.search-page .search-hero {
  margin-bottom: 20px;
  padding: clamp(22px, 3.2vw, 36px);
}

.search-page .hero-logo {
  width: min(176px, 44vw);
}

.search-page .search-hero h2 {
  font-size: clamp(32px, 4.4vw, 52px);
}

.search-page:not(.profiles-page) .search-hero h2 {
  color: #67d9ff;
}

.search-page:not(.profiles-page) .search-uploader .panel-heading h2 {
  color: #67d9ff;
}

.ecrs-page .search-stats,
.ecrs-page .mobile-results-stats {
  display: none;
}

.search-page.ecrs-page {
  background:
    radial-gradient(circle at 16% 4%, rgba(103, 217, 255, 0.1), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(21, 159, 211, 0.12), transparent 32%),
    linear-gradient(180deg, #081014 0%, #0b1013 48%, #06090b 100%);
}

.ecrs-page .search-hero {
  grid-template-columns: 1fr;
  place-items: center;
  margin-bottom: 0;
  min-height: clamp(260px, 34vw, 380px);
  padding: clamp(28px, 5vw, 54px) clamp(20px, 5vw, 64px);
  border-color: rgba(103, 217, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, #081014 0%, #10191d 48%, #081013 100%);
  box-shadow:
    0 26px 70px rgba(5, 7, 9, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.ecrs-page .search-hero::before {
  background:
    linear-gradient(90deg, transparent, rgba(103, 217, 255, 0.08), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px);
}

.ecrs-page .search-hero > div {
  display: grid;
  justify-items: center;
  width: min(760px, 100%);
}

.ecrs-page .hero-logo {
  width: clamp(164px, 23vw, 220px);
  margin: 0 auto 20px;
}

.ecrs-page .search-hero h2 {
  display: grid;
  justify-items: center;
  gap: 4px;
  position: relative;
  max-width: 720px;
  margin: 0 0 18px;
  padding-bottom: 16px;
  color: #e9fbff;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
  text-shadow: 0 18px 42px rgba(21, 159, 211, 0.26);
}

.ecrs-page .search-hero h2::after {
  content: "";
  width: min(220px, 58%);
  height: 2px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(103, 217, 255, 0.92), transparent);
  box-shadow: 0 0 24px rgba(103, 217, 255, 0.34);
}

.ecrs-page .search-hero h2 span {
  display: block;
  background: linear-gradient(180deg, #ffffff 0%, #d8f7ff 48%, #67d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ecrs-page .search-hero h2 span:first-child {
  font-size: 0.72em;
  font-weight: 750;
}

.ecrs-page .search-hero h2 span:last-child {
  font-size: 1em;
}

.ecrs-page .search-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(14px, 1.45vw, 16px);
  line-height: 1.75;
}

.ecrs-page .search-uploader .panel-heading h2 {
  display: inline-block;
  position: relative;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #d8f7ff 52%, #67d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 850;
  line-height: 1.05;
  text-shadow: 0 10px 26px rgba(21, 159, 211, 0.18);
}

.ecrs-page .search-uploader .panel-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 58px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #67d9ff, rgba(103, 217, 255, 0));
}

.search-page.ecrs-page .search-uploader .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 104px;
}

.ecrs-page .search-shell {
  display: grid;
  gap: 16px;
}

.ecrs-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(103, 217, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(4, 10, 13, 0.78);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.ecrs-mode-tab {
  position: relative;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ecrs-mode-tab:hover {
  background: rgba(103, 217, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.ecrs-mode-tab.is-active {
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.28), rgba(21, 159, 211, 0.18)),
    rgba(21, 159, 211, 0.14);
  color: #e9fbff;
  box-shadow:
    0 10px 22px rgba(21, 159, 211, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.ecrs-tab-panel {
  margin: 0;
}

.ecrs-tab-panel[hidden] {
  display: none !important;
}

.ecrs-filter-panel {
  position: relative;
  overflow: visible;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.055), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(13, 16, 18, 0.96), rgba(5, 6, 7, 0.98)),
    #07090a;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.ecrs-filter-panel .results-heading {
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 0;
}

.ecrs-filter-panel.is-filter-collapsed .results-heading {
  margin-bottom: 18px;
}

.ecrs-filter-panel .ecrs-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 40px;
  min-width: 0;
  padding: 0 14px 0 16px;
  border-color: rgba(103, 217, 255, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.18), rgba(21, 159, 211, 0.08)),
    rgba(255, 255, 255, 0.06);
  color: #a9ecff;
  font-size: 13px;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px rgba(21, 159, 211, 0.14);
  white-space: nowrap;
}

.ecrs-filter-panel .ecrs-filter-toggle::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(103, 217, 255, 0.16);
  color: #baf1ff;
  font-weight: 900;
}

.ecrs-filter-panel .ecrs-filter-toggle[aria-expanded="true"]::after {
  content: "-";
}

.ecrs-profile-panel .ecrs-results-heading {
  justify-content: center;
  text-align: center;
}

.ecrs-profile-panel .ecrs-results-heading > div {
  display: grid;
  justify-items: center;
  width: 100%;
}

.ecrs-filter-panel .results-heading h2,
.ecrs-upcoming-heading h2 {
  display: inline-block;
  position: relative;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #d8f7ff 52%, #67d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 850;
  line-height: 1.05;
  text-shadow: 0 10px 26px rgba(21, 159, 211, 0.18);
}

.ecrs-filter-panel .results-heading h2::after,
.ecrs-upcoming-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 58px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #67d9ff, rgba(103, 217, 255, 0));
}

.ecrs-filter-panel .results-heading p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.55;
}

.ecrs-active-filters {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: -4px 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(103, 217, 255, 0.12);
  border-radius: 8px;
  background: rgba(103, 217, 255, 0.055);
}

.ecrs-filter-panel:not(.is-filter-collapsed) .ecrs-active-filters {
  display: none;
}

.ecrs-active-filters > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.ecrs-active-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ecrs-active-filter-list strong {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(103, 217, 255, 0.2);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.12);
  color: #a9ecff;
  font-size: 12px;
  font-weight: 850;
}

.ecrs-active-filters > a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-search-form {
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-search-form[hidden] {
  display: none !important;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-filter-actions {
  grid-template-columns: repeat(2, 38px);
  gap: 6px;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 3px 7px 3px 10px;
  border: 1px solid rgba(103, 217, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field:focus-within {
  border-color: rgba(103, 217, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(21, 159, 211, 0.13);
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field span {
  color: #8fe7ff;
  font-size: 11px;
  font-weight: 900;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field input {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field input:hover,
.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field input:focus {
  background: transparent;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-filter-actions .button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .ecrs-search-icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .ecrs-filter-toggle {
  justify-self: auto;
  color: #bdf2ff;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .ecrs-filter-toggle::after {
  content: none;
}

.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .ecrs-filter-toggle.is-filter-active,
.search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .ecrs-filter-toggle[aria-expanded="true"] {
  border-color: rgba(251, 191, 36, 0.52);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.08)),
    rgba(255, 255, 255, 0.06);
  color: #ffe7a3;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-search-field span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-search-field input,
.search-page.ecrs-page .ecrs-filter-panel .profile-search-field select {
  min-height: 34px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-search-field input:hover,
.search-page.ecrs-page .ecrs-filter-panel .profile-search-field select:hover {
  border-color: rgba(21, 159, 211, 0.58);
  background: rgba(21, 159, 211, 0.1);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-search-field input:focus,
.search-page.ecrs-page .ecrs-filter-panel .profile-search-field select:focus {
  border-color: rgba(103, 217, 255, 0.62);
  background: rgba(21, 159, 211, 0.11);
  box-shadow: 0 0 0 3px rgba(21, 159, 211, 0.15);
  outline: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-filter-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 150px));
  gap: 8px;
  justify-content: end;
  padding-top: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-filter-actions .button {
  min-height: 36px;
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 12px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-filter-actions .button.primary {
  border-color: #159fd3;
  background: linear-gradient(135deg, #159fd3, #0b82b5);
  box-shadow: 0 16px 34px rgba(21, 159, 211, 0.24);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-filter-actions .button.ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

.ecrs-filter-panel .profile-list {
  gap: 6px;
}

.ecrs-filter-panel .profile-list li {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  min-height: 62px;
  padding: 7px 10px;
  border-color: rgba(103, 217, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.055);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ecrs-filter-panel .profile-list li:hover {
  border-color: rgba(103, 217, 255, 0.26);
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.115), transparent 45%),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.ecrs-filter-panel .profile-list-main strong {
  color: #eefcff;
  font-size: 15px;
}

.ecrs-filter-panel .profile-list-main span {
  color: rgba(255, 255, 255, 0.62);
}

.ecrs-filter-panel .profile-row-previews {
  grid-template-columns: 48px;
  gap: 0;
}

.ecrs-filter-panel .profile-row-previews img,
.ecrs-filter-panel .profile-row-preview-empty {
  width: 48px;
  border-radius: 6px;
}

.ecrs-filter-panel .profile-list-main {
  align-content: center;
  gap: 1px;
  min-width: 0;
}

.ecrs-filter-panel .profile-list-meta span {
  border: 1px solid rgba(103, 217, 255, 0.16);
  background: rgba(21, 159, 211, 0.12);
  color: #9fe7ff;
}

.ecrs-filter-panel .profile-edit-link {
  border-color: rgba(103, 217, 255, 0.22);
  color: #d8f7ff;
}

.ecrs-page .ecrs-profile-results {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 14px;
}

.ecrs-profile-match-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(103, 217, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.ecrs-profile-match-card.is-best {
  border-color: rgba(103, 217, 255, 0.4);
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.18), transparent 50%),
    rgba(255, 255, 255, 0.075);
}

.ecrs-profile-card-main {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.ecrs-profile-card-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 108px;
  aspect-ratio: 1;
  border: 1px solid rgba(103, 217, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 900;
}

.ecrs-profile-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ecrs-profile-card-copy {
  display: grid;
  justify-items: center;
  min-width: 0;
  gap: 8px;
  width: 100%;
}

.ecrs-profile-card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.ecrs-profile-card-topline span {
  color: #7fd5f4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ecrs-profile-card-topline strong {
  color: #ffffff;
  font-size: 20px;
}

.ecrs-profile-card-copy h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.1;
  text-align: center;
}

.ecrs-profile-card-copy h3 small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72em;
}

.ecrs-profile-card-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.ecrs-profile-card-copy p span {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
}

.ecrs-profile-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.ecrs-profile-card-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(103, 217, 255, 0.24);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.14);
  color: #d8f7ff;
  font-size: 12px;
  font-weight: 850;
}

.ecrs-profile-card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.search-page.ecrs-page .profile-view-focus-grid {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-bottom: 4px;
}

.search-page.ecrs-page .profile-view-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.search-page.ecrs-page .profile-view-row-single {
  grid-template-columns: minmax(0, 1fr);
}

.search-page.ecrs-page .profile-view-focus-grid .profile-view-field {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(103, 217, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.search-page.ecrs-page .profile-view-field-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.search-page.ecrs-page .profile-view-field-inline span {
  flex: 0 0 auto;
  color: rgba(216, 247, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.search-page.ecrs-page .profile-view-field-inline strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
}

.search-page.ecrs-page .profile-view-field-inline .profile-value-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.search-page.ecrs-page .profile-value-badges em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(103, 217, 255, 0.3);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.18);
  color: #d8f7ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.search-page.ecrs-page .profile-view-secondary-grid,
.search-page.ecrs-page .ecrs-profile-card-fields {
  margin-top: 0;
}

.ecrs-profile-card-events {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(103, 217, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.ecrs-profile-card-events > strong {
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.ecrs-events-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ecrs-events-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8f7ff;
  font-size: 15px;
  font-weight: 850;
}

.ecrs-events-heading span::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(103, 217, 255, 0.82);
  border-radius: 6px;
  background:
    linear-gradient(#67d9ff, #67d9ff) 5px 7px / 12px 1px no-repeat,
    linear-gradient(#67d9ff, #67d9ff) 5px 12px / 12px 1px no-repeat,
    linear-gradient(#67d9ff, #67d9ff) 5px 17px / 12px 1px no-repeat,
    rgba(103, 217, 255, 0.08);
  box-shadow: 0 0 12px rgba(103, 217, 255, 0.14);
}

.ecrs-events-heading strong {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(103, 217, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(103, 217, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.16);
  color: #d8f7ff;
  font-size: 12px;
  font-weight: 850;
}

.ecrs-events-heading strong::after {
  content: "⌄";
  color: #9fe7ff;
  font-size: 16px;
  line-height: 1;
}

.ecrs-events-heading[aria-expanded="true"] strong::after {
  content: "⌃";
}

.ecrs-events-heading[aria-expanded="false"] strong {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
}

.ecrs-events-body[hidden] {
  display: none;
}

.search-page .dropzone {
  animation: searchButtonReveal 220ms ease-out both;
}

.search-page .dropzone-preview.is-visible {
  animation: previewFadeIn 260ms ease-out both;
}

.ecrs-page .selfie-actions[hidden],
.ecrs-page .selfie-reset-button[hidden] {
  display: none;
}

.ecrs-page .selfie-preview-frame {
  min-height: 0;
  display: block;
  aspect-ratio: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: 0 16px 32px rgba(10, 18, 24, 0.18);
  cursor: default;
}

.ecrs-page .selfie-preview-frame:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: 0 16px 32px rgba(10, 18, 24, 0.18);
}

.ecrs-page .selfie-preview-frame .dropzone-preview {
  position: static;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: initial;
}

.search-page.ecrs-page .selfie-reset-button.button.ghost {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 36px;
  padding: 8px 13px;
  border-color: rgba(103, 217, 255, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(103, 217, 255, 0.22), rgba(21, 159, 211, 0.12)),
    rgba(3, 12, 17, 0.88);
  color: #e9fbff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(103, 217, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search-page.ecrs-page .selfie-reset-button.button.ghost:hover {
  border-color: rgba(103, 217, 255, 0.68);
  background:
    linear-gradient(180deg, rgba(103, 217, 255, 0.32), rgba(21, 159, 211, 0.18)),
    rgba(3, 12, 17, 0.94);
  transform: translateY(-1px);
}

.search-page.ecrs-page .selfie-reset-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

@media (max-width: 480px) {
  .search-page.ecrs-page .search-uploader .panel-heading {
    padding-right: 92px;
  }

  .search-page.ecrs-page .selfie-reset-button {
    top: 16px;
    right: 16px;
    min-height: 34px;
    padding: 7px 11px;
    font-size: 11px;
  }
}

.selfie-ready-state {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(21, 159, 211, 0.28);
  border-radius: 8px;
  background: rgba(21, 159, 211, 0.12);
  color: #fff;
  animation: searchButtonReveal 220ms ease-out both;
}

.selfie-ready-state[hidden] {
  display: none;
}

.selfie-ready-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #159fd3;
  color: #fff;
  font-weight: 900;
}

.selfie-ready-state strong,
.selfie-ready-state small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selfie-ready-state strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
}

.selfie-ready-state small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.search-page .results-panel {
  animation: searchButtonReveal 260ms ease-out both;
}

.search-page .match-download {
  gap: 7px;
}

.matched-profile-card {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(21, 159, 211, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.06);
}

.matched-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.profile-kicker {
  display: block;
  margin-bottom: 5px;
  color: #7fd5f4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.matched-profile-header h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 22px;
}

.matched-profile-header h3 small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
}

.matched-profile-score {
  display: grid;
  min-width: 112px;
  gap: 2px;
  justify-items: end;
}

.matched-profile-score strong {
  color: #ffffff;
  font-size: 22px;
}

.matched-profile-score span,
.matched-profile-reference {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.matched-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.matched-profile-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.matched-profile-field span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.matched-profile-field strong {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.45;
}

.matched-profile-wide {
  grid-column: 1 / -1;
}

.matched-events-field {
  gap: 10px;
  border-color: rgba(21, 159, 211, 0.2);
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.16);
}

.matched-event-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matched-event-pills strong {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(103, 217, 255, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.24), rgba(21, 159, 211, 0.12)),
    rgba(255, 255, 255, 0.08);
  color: #d8f6ff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.matched-profile-event-list {
  display: grid;
  gap: 8px;
}

.ecrs-profile-card-events .matched-profile-event-list {
  position: relative;
  gap: 12px;
  padding: 4px 0 2px 36px;
}

.ecrs-profile-card-events .matched-profile-event-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 10px;
  width: 1px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(103, 217, 255, 0.96), rgba(21, 159, 211, 0.86));
  box-shadow: 0 0 8px rgba(103, 217, 255, 0.12);
}

.matched-profile-event {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(103, 217, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.ecrs-profile-card-events .matched-profile-event {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(103, 217, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(103, 217, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(3, 12, 17, 0.58);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.ecrs-profile-card-events .matched-profile-event::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -32px;
  z-index: 2;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(103, 217, 255, 0.78);
  border-radius: 999px;
  background: radial-gradient(circle, #ecfbff 0 23%, #45cdf3 24% 48%, #071014 49%);
  box-shadow:
    0 0 0 3px rgba(103, 217, 255, 0.055),
    0 0 10px rgba(103, 217, 255, 0.18);
  transform: translateY(-50%);
}

.ecrs-profile-card-events .matched-profile-event::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -20px;
  width: 20px;
  height: 1px;
  background: rgba(103, 217, 255, 0.3);
}

.ecrs-profile-card-events .matched-profile-event-main {
  display: grid;
  grid-template-columns: minmax(58px, 78px) minmax(0, 1fr);
  align-items: center;
  min-height: inherit;
  min-width: 0;
}

.matched-profile-event strong,
.matched-profile-event small,
.matched-profile-event em {
  overflow-wrap: anywhere;
}

.ecrs-profile-card-events .matched-profile-event strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  padding: 12px 12px 12px 16px;
  border-left: 1px solid rgba(103, 217, 255, 0.13);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ecrs-profile-card-events .matched-profile-event small {
  display: inline-flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  color: #aeeeff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.ecrs-profile-card-events .matched-profile-event em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.matched-profile-reference {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Event album workspace */
.events-page .events-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.events-page .event-sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.events-page .event-sidebar .search-uploader,
.events-page .event-sidebar .results-panel,
.events-page .event-gallery-panel,
.events-page .event-gallery-placeholder {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

.events-page .event-form-panel {
  position: static;
  padding: 20px;
}

.events-page .event-form-panel .panel-heading {
  margin-bottom: 14px;
}

.events-page .event-form-panel .field {
  margin-bottom: 12px;
}

.events-page .event-list-panel {
  padding: 20px;
}

.profile-events-page .event-list-panel {
  padding: 18px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.055), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(13, 16, 18, 0.96), rgba(5, 6, 7, 0.98)),
    #07090a;
  color: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.events-page .event-list-panel .panel-heading {
  margin-bottom: 14px;
}

.profile-events-page .event-list-panel .panel-heading {
  display: grid;
  justify-content: start;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-events-page .event-list-panel .panel-heading h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
}

.profile-events-page .event-list-panel .panel-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.profile-events-page .event-master-search {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-events-page .event-master-search span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  font-weight: 850;
}

.profile-events-page .event-master-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.94);
  font: inherit;
  outline: 0;
}

.profile-events-page .event-master-search input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.profile-events-page .event-master-search input:focus {
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.events-page .event-list-panel .event-list {
  max-height: 430px;
  padding-right: 4px;
  scrollbar-color: rgba(21, 159, 211, 0.5) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.profile-events-page .event-list-panel .event-list {
  gap: 9px;
  max-height: 520px;
  padding-right: 6px;
}

.events-page .event-list li > a {
  gap: 10px;
  padding: 11px;
}

.profile-events-page .event-list li {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.profile-events-page .event-list li:hover,
.profile-events-page .event-list li.is-active {
  border-color: rgba(21, 159, 211, 0.34);
  background: rgba(21, 159, 211, 0.085);
}

.profile-events-page .event-list li > a {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
}

.events-page .event-list-icon {
  width: 38px;
  height: 38px;
}

.profile-events-page .event-list-icon {
  display: none;
}

.profile-events-page .event-list-content {
  gap: 4px;
}

.profile-events-page .event-list-content strong {
  overflow: visible;
  color: #f8fbff;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.profile-events-page .event-list-content small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.profile-events-page .event-list-id {
  align-self: start;
  padding: 4px 8px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.profile-events-page .event-master-no-results {
  padding: 16px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.profile-events-page .event-master-no-results[hidden] {
  display: none;
}

.events-page .event-gallery-panel {
  padding: 24px;
  scroll-margin-top: 18px;
}

.events-page .event-gallery-placeholder {
  display: grid;
  min-height: 420px;
  place-items: center;
}

.events-page .event-gallery-placeholder .premium-empty {
  width: min(420px, 100%);
}

.events-page .event-photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .events-page .events-workspace {
    grid-template-columns: 1fr;
  }

  .events-page .events-workspace.has-selected-event .event-gallery-panel {
    grid-row: 1;
  }

  .events-page .events-workspace.has-selected-event .event-sidebar {
    grid-row: 2;
  }

  .events-page .event-list-panel .event-list {
    max-height: 360px;
  }
}

@media (max-width: 560px) {
  .events-page .events-workspace {
    gap: 18px;
  }

  .events-page .event-gallery-panel,
  .events-page .event-gallery-placeholder {
    padding: 18px;
  }

  .events-page .event-gallery-placeholder {
    min-height: 260px;
  }

.events-page .event-photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  }
}

@media (max-width: 620px) {
  .ecrs-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 4px;
  }

  .ecrs-mode-tab {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }

  .ecrs-filter-panel .results-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    justify-items: stretch;
    justify-content: stretch;
    margin-bottom: 18px;
    text-align: left;
  }

  .ecrs-filter-panel.is-filter-collapsed .results-heading {
    margin-bottom: 20px;
  }

  .ecrs-filter-panel .results-heading > div {
    display: grid;
    justify-items: start;
    width: auto;
  }

  .ecrs-filter-panel .ecrs-filter-toggle {
    justify-self: end;
    width: auto;
    min-width: 0;
    min-height: 36px;
    margin-bottom: 0;
    padding: 0 12px 0 14px;
    font-size: 12px;
  }

  .ecrs-filter-panel .profile-list {
    margin-top: 2px;
  }

  .ecrs-active-filters {
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    margin-bottom: 16px;
  }

  .ecrs-active-filters > span {
    grid-column: 1;
  }

  .ecrs-active-filter-list {
    grid-column: 1 / -1;
    order: 3;
  }

  .ecrs-active-filters > a {
    grid-column: 2;
    justify-self: end;
  }

  .search-page.ecrs-page .ecrs-filter-panel .profile-search-form {
    margin-bottom: 14px;
    padding: 10px;
  }

  .search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin-bottom: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-search-field {
    min-height: 40px;
  }

  .search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-filter-actions {
    grid-template-columns: repeat(2, 38px);
    gap: 6px;
  }

  .search-page.ecrs-page .ecrs-filter-panel .ecrs-primary-search-form .profile-filter-actions .button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .search-page.ecrs-page .ecrs-filter-panel .profile-filter-actions {
    grid-template-columns: 1fr;
    gap: 9px;
    justify-content: stretch;
  }

  .search-page.ecrs-page .ecrs-filter-panel .profile-filter-actions .button {
    min-height: 38px;
  }

  .matched-profile-header,
  .matched-profile-grid,
  .ecrs-profile-card-main,
  .ecrs-profile-card-fields {
    grid-template-columns: 1fr;
  }

  .matched-profile-score {
    justify-items: start;
  }

  .ecrs-profile-match-card {
    padding: 14px;
  }

  .ecrs-profile-card-photo {
    width: min(132px, 100%);
  }

  .ecrs-profile-card-events .matched-profile-event-list {
    padding-left: 30px;
  }

  .ecrs-profile-card-events .matched-profile-event-list::before {
    left: 8px;
  }

  .ecrs-profile-card-events .matched-profile-event::before {
    left: -27px;
  }

  .ecrs-profile-card-events .matched-profile-event::after {
    left: -15px;
    width: 15px;
  }

  .ecrs-profile-card-events .matched-profile-event-main {
    grid-template-columns: minmax(52px, 64px) minmax(0, 1fr);
  }

  .ecrs-profile-card-events .matched-profile-event small {
    font-size: 14px;
    padding: 10px 8px;
  }

  .ecrs-profile-card-events .matched-profile-event strong {
    padding: 10px 10px 10px 12px;
    font-size: 12px;
  }
}

/* Final bottom-nav size lock across tab and viewport changes. */
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav {
  grid-template-rows: 54px;
  align-items: center;
  width: min(640px, calc(100vw - 36px));
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  box-sizing: border-box;
  contain: layout;
  transition: none;
}

/* ECRS customer search: keep the controls and customer cards flush with the
   event cards above, without the striped outer panel treatment. */
.search-page.ecrs-page .ecrs-tab-panel > .ecrs-filter-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item,
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item *,
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item.is-active {
  transition-property: color, background-color, box-shadow;
  transition-duration: 160ms;
}

.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav .ecrs-mode-copy {
  min-width: 0;
  height: 18px;
  line-height: 18px;
}

.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav .ecrs-mode-copy strong {
  display: block;
  height: 18px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav {
    right: 0;
    grid-template-rows: 68px;
    width: 100vw;
    height: calc(83px + env(safe-area-inset-bottom));
    min-height: calc(83px + env(safe-area-inset-bottom));
    max-height: calc(83px + env(safe-area-inset-bottom));
  }
}

/* Refined event history inside face-search customer details. */
.search-page.ecrs-page .ecrs-profile-card-events.ecrs-profile-events-modern {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(103, 217, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(21, 159, 211, 0.08), rgba(3, 10, 14, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading {
  min-height: 58px;
  padding: 11px 12px;
  background: linear-gradient(90deg, rgba(103, 217, 255, 0.09), transparent);
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading:hover,
.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading:focus-visible {
  outline: none;
  background: rgba(103, 217, 255, 0.12);
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading span {
  min-width: 0;
  color: #eefcff;
  font-size: 14px;
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading span::before {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(#d8f7ff, #d8f7ff) 9px 11px / 16px 2px no-repeat,
    linear-gradient(#d8f7ff, #d8f7ff) 9px 17px / 16px 2px no-repeat,
    linear-gradient(#d8f7ff, #d8f7ff) 9px 23px / 11px 2px no-repeat,
    linear-gradient(135deg, #159fd3, #0b6e9a);
  box-shadow: 0 8px 18px rgba(21, 159, 211, 0.24);
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading span em {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  margin-left: 2px;
  padding: 0 7px;
  border: 1px solid rgba(103, 217, 255, 0.24);
  border-radius: 999px;
  background: rgba(103, 217, 255, 0.1);
  color: #9fe7ff;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading > strong {
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading > strong::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-heading[aria-expanded="true"] > strong::after {
  content: "";
  transform: rotate(225deg) translate(-2px, -2px);
}

.search-page.ecrs-page .ecrs-profile-events-modern > .ecrs-events-body {
  padding: 4px 12px 14px;
  border-top: 1px solid rgba(103, 217, 255, 0.1);
  background: rgba(0, 0, 0, 0.12);
}

.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event-list {
  gap: 8px;
  padding: 12px 0 0;
}

.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event-list::before,
.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event::before,
.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event::after {
  content: none;
  display: none;
}

.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event {
  min-height: 54px;
  overflow: hidden;
  border-color: rgba(103, 217, 255, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event-main {
  grid-template-columns: 64px minmax(0, 1fr);
}

.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event small {
  background: rgba(21, 159, 211, 0.1);
  color: #8ee7ff;
  font-size: 12px;
}

.search-page.ecrs-page .ecrs-profile-events-modern .matched-profile-event strong {
  padding: 11px 12px;
  color: #f3fcff;
  font-size: 13px;
}

/* Face-search customer cards use the same expandable detail pattern as data search. */
.search-page.ecrs-page .ecrs-profile-match-card[data-profile-card-toggle] {
  cursor: pointer;
  outline: none;
}

.search-page.ecrs-page .ecrs-profile-match-card[data-profile-card-toggle]:focus-visible {
  border-color: rgba(103, 217, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(21, 159, 211, 0.14), 0 18px 42px rgba(0, 0, 0, 0.18);
}

.search-page.ecrs-page .ecrs-profile-match-card > .profile-card-affordance {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-self: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(103, 217, 255, 0.18);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.08);
  color: #bdefff;
  font-size: 12px;
  font-weight: 850;
}

.search-page.ecrs-page .ecrs-profile-match-card > .profile-card-affordance i {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.search-page.ecrs-page .ecrs-profile-match-card > .profile-card-affordance-close {
  display: none;
}

.search-page.ecrs-page .ecrs-profile-match-card > .profile-card-affordance .profile-card-affordance-close {
  display: none;
}

.search-page.ecrs-page .ecrs-profile-match-card.is-expanded > .profile-card-affordance .profile-card-affordance-open {
  display: none;
}

.search-page.ecrs-page .ecrs-profile-match-card.is-expanded > .profile-card-affordance .profile-card-affordance-close {
  display: inline;
}

.search-page.ecrs-page .ecrs-profile-match-card.is-expanded > .profile-card-affordance i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.search-page.ecrs-page .ecrs-profile-match-card > .profile-view-panel {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(103, 217, 255, 0.14);
}

.search-page.ecrs-page .ecrs-profile-match-card > .profile-view-panel[hidden] {
  display: none !important;
}

/* True mobile freeze: only the main content scrolls; both bars stay in layout. */
@media (max-width: 620px), (pointer: coarse) {
  html:has(body.search-page.ecrs-page) {
    height: 100%;
    overflow: hidden;
  }

  body.search-page.ecrs-page {
    display: grid !important;
    grid-template-rows: 44px minmax(0, 1fr) 82px !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.search-page.ecrs-page > .ecrs-directory-bar {
    position: relative !important;
    inset: auto !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }

  body.search-page.ecrs-page > .search-shell {
    position: relative !important;
    grid-row: 2 !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-top: 16px !important;
    padding-bottom: 20px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.search-page.ecrs-page > .ecrs-app-nav {
    position: relative !important;
    inset: auto !important;
    grid-row: 3 !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    margin: 0 !important;
  }
}

/* Mobile active state stays inside the bar; no oversized active card. */
@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-app-nav {
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    padding: 7px 8px !important;
    overflow: hidden !important;
    contain: layout !important;
  }

  .search-page.ecrs-page .ecrs-app-nav-item,
  .search-page.ecrs-page .ecrs-app-nav-item:hover,
  .search-page.ecrs-page .ecrs-app-nav-item:focus-visible,
  .search-page.ecrs-page .ecrs-app-nav-item.is-active {
    position: relative;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    margin: 0 !important;
    padding: 6px 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .search-page.ecrs-page .ecrs-app-nav-item.is-active {
    color: #67d9ff !important;
  }

  .search-page.ecrs-page .ecrs-app-nav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 38px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    transform: translateX(-50%);
  }
}

/* Pin ECRS chrome to the visible viewport, including mobile browser toolbars. */
.search-page.ecrs-page {
  padding-top: 48px;
}

.search-page.ecrs-page .ecrs-directory-bar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  z-index: 1800 !important;
  width: 100vw !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  transform: none !important;
}

.search-page.ecrs-page .ecrs-app-nav {
  position: fixed !important;
  bottom: 18px !important;
  z-index: 1800 !important;
  transform: none !important;
  animation: none !important;
}

@media (max-width: 620px) {
  .search-page.ecrs-page {
    padding-top: 44px;
  }

  .search-page.ecrs-page .ecrs-directory-bar {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }

  .search-page.ecrs-page .ecrs-app-nav {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* Isolated, always-visible ECRS app navigation. */
.search-page.ecrs-page .ecrs-app-nav {
  position: fixed;
  left: max(18px, calc((100vw - 640px) / 2));
  bottom: 18px;
  z-index: 1200;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 54px;
  width: min(640px, calc(100vw - 36px));
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(103, 217, 255, 0.18);
  border-radius: 18px;
  box-sizing: border-box;
  background: rgba(10, 13, 16, 0.96);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.25);
  contain: layout paint;
}

.search-page.ecrs-page .ecrs-app-nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  box-sizing: border-box;
  appearance: none;
  background: transparent;
  color: rgba(203, 213, 225, 0.6);
  font: inherit;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.search-page.ecrs-page .ecrs-app-nav-item:hover,
.search-page.ecrs-page .ecrs-app-nav-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: #eefcff;
}

.search-page.ecrs-page .ecrs-app-nav-item.is-active {
  background: rgba(21, 159, 211, 0.16);
  color: #67d9ff;
  box-shadow: inset 0 0 0 1px rgba(103, 217, 255, 0.18);
}

.search-page.ecrs-page .ecrs-app-nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: currentColor;
}

.search-page.ecrs-page .ecrs-app-nav-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-page.ecrs-page .ecrs-app-nav-label {
  display: block;
  min-width: 0;
  height: 18px;
  overflow: hidden;
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-app-nav {
    left: 0;
    right: 0;
    bottom: 0;
    grid-template-rows: 68px;
    width: 100vw;
    height: calc(83px + env(safe-area-inset-bottom));
    min-height: calc(83px + env(safe-area-inset-bottom));
    max-height: calc(83px + env(safe-area-inset-bottom));
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 0;
  }

  .search-page.ecrs-page .ecrs-app-nav-item {
    grid-template-columns: 1fr;
    grid-template-rows: 30px 18px;
    justify-items: center;
    gap: 4px;
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    padding: 6px 3px;
  }

  .search-page.ecrs-page .ecrs-app-nav-label {
    width: 100%;
    font-size: clamp(10px, 3vw, 12px);
  }
}

/* ECRS calendar: dark theme and compact mobile month view. */
.search-page.ecrs-page.ecrs-calendar-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(21, 159, 211, 0.12), transparent 32%),
    linear-gradient(180deg, #07141b 0%, #050b0f 54%, #020608 100%);
  color: #eefcff;
}

.search-page.ecrs-calendar-page .ecrs-calendar-heading {
  border-color: rgba(103, 217, 255, 0.17);
  background:
    radial-gradient(circle at 92% 10%, rgba(21, 159, 211, 0.2), transparent 34%),
    linear-gradient(135deg, #111b21, #091116);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-page.ecrs-calendar-page .event-calendar-panel {
  border-color: rgba(103, 217, 255, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(21, 159, 211, 0.1), transparent 30%),
    linear-gradient(145deg, #11191e, #080e12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.search-page.ecrs-calendar-page .event-calendar-toolbar {
  border-color: rgba(103, 217, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.search-page.ecrs-calendar-page .event-calendar-weekdays {
  background: #101a20;
}

.search-page.ecrs-calendar-page .event-calendar-day {
  background: rgba(255, 255, 255, 0.025);
}

.search-page.ecrs-calendar-page .event-calendar-day:nth-child(7n + 6),
.search-page.ecrs-calendar-page .event-calendar-day:nth-child(7n + 7) {
  background: rgba(21, 159, 211, 0.055);
}

@media (max-width: 620px) {
  .search-page.ecrs-calendar-page {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .search-page.ecrs-calendar-page > .search-shell {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .search-page.ecrs-calendar-page .ecrs-calendar-heading {
    margin-bottom: 10px;
    padding: 12px 14px;
  }

  .ecrs-calendar-heading p {
    font-size: 0.6rem;
  }

  .ecrs-calendar-heading h1 {
    font-size: 1.35rem;
  }

  .ecrs-calendar-heading span {
    margin-top: 4px;
    font-size: 0.72rem;
  }

  .ecrs-calendar-heading > strong {
    font-size: 1.5rem;
  }

  .search-page.ecrs-calendar-page .event-calendar-panel {
    padding: 8px;
    border-radius: 12px;
  }

  .search-page.ecrs-calendar-page .event-calendar-toolbar {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    gap: 5px;
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 9px;
  }

  .search-page.ecrs-calendar-page .event-calendar-toolbar .button {
    width: 72px;
    min-height: 34px;
    padding: 5px;
    font-size: 0.64rem;
  }

  .search-page.ecrs-calendar-page .event-calendar-toolbar p {
    font-size: 0.58rem;
  }

  .search-page.ecrs-calendar-page .event-calendar-toolbar h2 {
    font-size: 1rem;
  }

  .search-page.ecrs-calendar-page .event-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-radius: 8px 8px 0 0;
  }

  .search-page.ecrs-calendar-page .event-calendar-weekdays span {
    padding: 6px 1px;
    font-size: 0.56rem;
    letter-spacing: 0;
  }

  .search-page.ecrs-calendar-page .event-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(103, 217, 255, 0.12);
    border-left: 1px solid rgba(103, 217, 255, 0.12);
  }

  .search-page.ecrs-calendar-page .event-calendar-day,
  .search-page.ecrs-calendar-page .event-calendar-day.is-outside:not(.is-today) {
    display: block;
    min-width: 0;
    min-height: 72px;
    padding: 3px;
    border-width: 0 1px 1px 0;
    border-style: solid;
    border-color: rgba(103, 217, 255, 0.1);
    border-radius: 0;
  }

  .search-page.ecrs-calendar-page .event-calendar-day > header {
    display: flex;
    justify-content: center;
    margin: 0 0 3px;
  }

  .search-page.ecrs-calendar-page .event-calendar-mobile-weekday {
    display: none;
  }

  .search-page.ecrs-calendar-page .event-calendar-day > header strong {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .search-page.ecrs-calendar-page .event-calendar-day-events {
    gap: 2px;
  }

  .search-page.ecrs-calendar-page .event-calendar-event {
    display: block;
    min-width: 0;
    padding: 3px;
    border: 0;
    border-radius: 4px;
    background: rgba(21, 159, 211, 0.24);
    text-align: center;
  }

  .search-page.ecrs-calendar-page .event-calendar-event:nth-child(n + 3) {
    display: none;
  }

  .search-page.ecrs-calendar-page .event-calendar-event strong {
    display: block;
    font-size: 0.48rem;
    line-height: 1.25;
  }

  .search-page.ecrs-calendar-page .event-calendar-event small {
    display: none;
  }
}

/* ECRS bottom navigation */
.search-page.ecrs-page {
  padding-bottom: 112px;
}

.search-page.ecrs-page .ecrs-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 1200;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(640px, calc(100% - 36px));
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(103, 217, 255, 0.18);
  border-radius: 18px;
  background: rgba(10, 13, 16, 0.94);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.25);
  transform: translateX(-50%);
}

.search-page.ecrs-page .ecrs-bottom-nav-item,
.search-page.ecrs-page .ecrs-mode-tab.ecrs-bottom-nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 54px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(203, 213, 225, 0.58);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  overflow: visible;
  transform: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
  order: initial;
}

.search-page.ecrs-page .ecrs-bottom-nav-item::before,
.search-page.ecrs-page .ecrs-bottom-nav-item::after {
  display: none;
}

.search-page.ecrs-page .ecrs-bottom-nav-item:hover,
.search-page.ecrs-page .ecrs-bottom-nav-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: #eefcff;
  transform: translateY(-1px);
}

.search-page.ecrs-page .ecrs-bottom-nav-item.is-active {
  background: linear-gradient(135deg, rgba(21, 159, 211, 0.24), rgba(21, 159, 211, 0.08));
  color: #67d9ff;
  box-shadow: inset 0 0 0 1px rgba(103, 217, 255, 0.18);
}

.search-page.ecrs-page .ecrs-bottom-nav-item .ecrs-mode-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: currentColor;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-bottom-nav-item .ecrs-mode-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.search-page.ecrs-page .ecrs-bottom-nav-item .ecrs-mode-copy {
  display: block;
  color: currentColor;
}

.search-page.ecrs-page .ecrs-bottom-nav-item .ecrs-mode-copy strong {
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .search-page.ecrs-page {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .search-page.ecrs-page .ecrs-bottom-nav {
    left: 0;
    bottom: 0;
    width: 100%;
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 0;
    background: rgba(14, 14, 15, 0.97);
    transform: none;
  }

  .search-page.ecrs-page .ecrs-bottom-nav-item,
  .search-page.ecrs-page .ecrs-mode-tab.ecrs-bottom-nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    min-height: 68px;
    padding: 6px 3px;
    border-radius: 10px;
  }

  .search-page.ecrs-page .ecrs-bottom-nav-item .ecrs-mode-icon {
    width: 30px;
    height: 30px;
  }

  .search-page.ecrs-page .ecrs-bottom-nav-item .ecrs-mode-copy strong {
    font-size: clamp(10px, 3vw, 12px);
  }
}

/* Customer profile workspace */
.profiles-page .profiles-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.profiles-page .profiles-hero h2 {
  color: #67d9ff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.profiles-page .profiles-hero .search-stats div:last-child span {
  overflow-wrap: anywhere;
  color: #8edcf6;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.25;
}

.profiles-page .profile-form-panel,
.profiles-page .profile-list-panel {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

.profiles-page .profile-create-panel {
  padding: 0;
  overflow: hidden;
}

.profiles-page .profile-create-panel form {
  padding: 0 24px 24px;
}

.profiles-page .profile-create-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.profiles-page .profile-create-summary::-webkit-details-marker {
  display: none;
}

.profiles-page .profile-create-summary strong,
.profiles-page .profile-create-summary small {
  display: block;
}

.profiles-page .profile-create-summary strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 20px;
}

.profiles-page .profile-create-summary small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.profiles-page .profile-create-toggle {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(21, 159, 211, 0.3);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.12);
  color: #8edcf6;
  font-size: 24px;
  font-weight: 800;
}

.profiles-page .profile-create-panel[open] .profile-create-toggle {
  transform: rotate(45deg);
}

.profiles-page .profile-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.profiles-page .profile-form-sections {
  display: grid;
  gap: 18px;
}

.profiles-page .profile-form-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 44%),
    rgba(255, 255, 255, 0.045);
}

.profiles-page .profile-form-section legend {
  padding: 0 8px;
  color: #8edcf6;
  font-size: inherit;
  font-weight: 900;
  text-transform: uppercase;
}

.profiles-page .profile-form-panel label {
  color: rgba(255, 255, 255, 0.9);
}

.profiles-page .profile-form-panel label.is-required::after {
  content: " *";
  color: #ff5c5c;
  font-weight: 900;
}

.profiles-page .profile-birthday-input {
  color-scheme: dark;
  cursor: pointer;
}

.profiles-page .profile-birthday-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1) opacity(0.8);
}

.profiles-page .profile-form-panel input,
.profiles-page .profile-form-panel select,
.profiles-page .profile-form-panel textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

.profiles-page .profile-form-panel textarea {
  min-height: 92px;
  resize: vertical;
}

.profiles-page .profile-form-panel input[type="file"] {
  padding: 11px;
}

.profiles-page .profile-multi-choice {
  display: grid;
  gap: 8px;
}

.profiles-page .profile-form-grid.profile-company-group-grid {
  grid-template-columns: 1fr;
}

.profiles-page .profile-company-group-field {
  width: 100%;
}

.profiles-page .profile-company-group-choices {
  grid-template-columns: repeat(5, minmax(82px, 1fr));
}

.profiles-page .profile-pic-field {
  grid-column: span 2;
}

.profiles-page .profile-pic-choices {
  grid-template-columns: repeat(5, minmax(58px, 1fr));
}

.profile-edit-page .profile-status-field {
  grid-column: span 2;
}

.profiles-page .profile-multi-choice label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  justify-content: center;
  text-align: center;
}

.profiles-page .profile-form-panel .profile-multi-choice input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: #159fd3;
}

.profiles-page .profile-multi-choice label:has(input:checked) {
  border-color: #159fd3;
  background: rgba(21, 159, 211, 0.22);
}

.profiles-page .profile-reference-upload-field {
  max-width: 720px;
}

.profiles-page .profile-reference-upload-field input[type="file"] {
  min-height: 56px;
  padding: 14px;
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
}

.profiles-page .profile-reference-upload-field .file-note {
  max-width: 520px;
  line-height: 1.45;
}

.reference-preview-strip {
  display: grid;
  grid-template-columns: minmax(86px, 120px);
  gap: 10px;
  margin-top: 10px;
}

.reference-preview-strip[hidden],
.reference-preview-strip:empty {
  display: none;
}

.reference-preview-strip figure {
  display: grid;
  gap: 6px;
  margin: 0;
}

.reference-preview-strip img,
.reference-preview-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
}

.reference-preview-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #86d7f2;
  font-size: 13px;
  font-weight: 900;
}

.reference-preview-strip figcaption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.profiles-page .profile-form-panel input:focus,
.profiles-page .profile-form-panel select:focus,
.profiles-page .profile-form-panel textarea:focus {
  outline: none;
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.profiles-page .profile-form-panel select option {
  background: #111518;
  color: #fff;
}

.profiles-page .profile-wide-field {
  grid-column: 1 / -1;
}

.profiles-page .profile-contact-person-list {
  display: grid;
  gap: 8px;
}

.profiles-page .profile-contact-person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.profiles-page .profile-contact-person-row .button {
  min-height: 42px;
}

.profiles-page .profile-add-contact-person-button {
  justify-self: start;
  margin-top: 8px;
}

.profiles-page .profile-event-list {
  display: grid;
  gap: 12px;
}

.profiles-page .profile-event-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profiles-page .profile-event-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profiles-page .profile-event-card-heading strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 900;
}

.profiles-page .profile-event-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profiles-page .profile-add-event-button {
  justify-self: start;
}

.profiles-page .profile-section-description {
  margin: -4px 0 2px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.profiles-page .profile-key-insight-list {
  display: grid;
  gap: 10px;
}

.profiles-page .profile-key-insight-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.5fr) auto;
  align-items: end;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(103, 217, 255, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(21, 159, 211, 0.07), rgba(255, 255, 255, 0.035));
}

.profiles-page .profile-key-insight-row .field {
  min-width: 0;
  margin: 0;
}

.profiles-page .profile-key-insight-row textarea {
  min-height: 46px;
  height: 46px;
  resize: vertical;
}

.profiles-page .profile-key-insight-remove {
  min-height: 46px;
}

.profiles-page .profile-add-key-insight-button {
  justify-self: start;
  border-color: rgba(103, 217, 255, 0.3);
  color: #9de8ff;
}

@media (max-width: 760px) {
  .profiles-page .profile-key-insight-row {
    grid-template-columns: 1fr;
  }

  .profiles-page .profile-key-insight-remove {
    justify-self: start;
  }
}

.profiles-page .profile-form-panel form > .button.primary {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border-color: #159fd3;
  background: linear-gradient(135deg, #159fd3, #0b82b5);
}

.profiles-page .profile-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profiles-page .profile-search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.profiles-page .profile-search-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profiles-page .profile-search-field span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.profiles-page .profile-search-field input,
.profiles-page .profile-search-field select {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

.profiles-page .profile-search-field select option {
  background: #111518;
  color: #fff;
}

.profiles-page .profile-search-field input:focus,
.profiles-page .profile-search-field select:focus {
  outline: none;
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.profiles-page .profile-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profiles-page .profile-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.profiles-page .profile-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.065);
}

.profiles-page .profile-row-previews {
  display: grid;
  grid-template-columns: 54px;
  gap: 8px;
}

.profiles-page .profile-row-previews img,
.profiles-page .profile-row-preview-empty {
  width: 54px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  object-fit: cover;
}

.profiles-page .profile-row-preview-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
  font-weight: 800;
}

.profiles-page .profile-list-main,
.profiles-page .profile-list-meta {
  display: grid;
  gap: 3px;
}

.profiles-page .profile-list-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.94);
}

.profiles-page .profile-list-main span,
.profiles-page .profile-list-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.profiles-page .profile-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profiles-page .profile-list-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.13);
  color: #86d7f2;
  font-weight: 700;
}

.profiles-page .profile-view-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.profiles-page .profile-view-panel[hidden] {
  display: none;
}

.profiles-page .profile-view-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profiles-page .profile-view-field,
.profiles-page .profile-view-events {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profiles-page .profile-view-field span,
.profiles-page .profile-view-events > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.profiles-page .profile-view-field strong,
.profiles-page .profile-view-events > strong {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.profiles-page .profile-view-event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profiles-page .profile-view-event {
  display: inline-grid;
  gap: 2px;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(21, 159, 211, 0.12);
}

.profiles-page .profile-view-event strong {
  color: #d9f6ff;
  font-size: 13px;
}

.profiles-page .profile-view-event small,
.profiles-page .profile-view-event em {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-style: normal;
}

.profiles-page .profile-edit-link {
  min-width: 112px;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.profile-edit-page .profile-edit-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 24px;
  align-items: start;
}

.profile-edit-page .profile-form-panel {
  padding: 24px;
}

.profile-edit-page .profile-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-edit-page .profile-form-section {
  padding: 16px;
}

.profile-edit-page .profile-save-button {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
}

.profile-edit-page .profile-form-panel,
.profile-edit-page .profile-reference-column,
.profile-edit-page .profile-add-face-panel,
.profile-edit-page .profile-reference-panel {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

.profile-edit-page .profile-reference-column {
  display: grid;
  gap: 18px;
}

.profile-edit-page .profile-add-face-panel,
.profile-edit-page .profile-reference-panel,
.profile-edit-page .profile-business-card-panel {
  padding: 20px;
}

.profiles-page .profile-business-card-field input[type="file"],
.profile-business-card-panel input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.business-card-grid {
  display: grid;
  gap: 14px;
}

.business-card-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.business-card-item img,
.business-card-empty {
  display: block;
  width: 100%;
  aspect-ratio: 1.75 / 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.business-card-item img {
  object-fit: contain;
}

.business-card-empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.5);
}

.business-card-item form {
  display: grid;
  gap: 8px;
}

.business-card-item small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-page .profile-add-face-panel label {
  color: rgba(255, 255, 255, 0.9);
}

.profile-edit-page .profile-add-face-panel input[type="file"] {
  width: 100%;
  min-height: 56px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-style: dashed;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(21, 159, 211, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
}

.profile-edit-page .profile-add-face-panel > .button.primary {
  width: 100%;
  min-height: 46px;
}

.profile-edit-page .profile-add-face-panel > .button.primary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.reference-preview-strip-compact {
  grid-template-columns: repeat(3, minmax(70px, 90px));
}

.reference-face-grid {
  display: grid;
  gap: 12px;
}

.reference-face-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
}

.reference-face-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.reference-face-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reference-face-body strong,
.reference-face-body span,
.reference-face-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-face-body strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.reference-face-body span,
.reference-face-body small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.reference-delete-button {
  width: 100%;
  border-color: rgba(255, 95, 95, 0.28);
  color: #ffb5b5;
}

.profile-auth-nav {
  align-items: center;
}

.profile-auth-nav span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(21, 159, 211, 0.18);
  border-radius: 8px;
  background: rgba(21, 159, 211, 0.08);
  color: #0b82b5;
  font-size: 13px;
  font-weight: 800;
}

.profile-login-field {
  display: grid;
  gap: 8px;
}

.profile-login-field span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.profile-login-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

.profile-login-field input:focus {
  outline: none;
  border-color: rgba(24, 167, 218, 0.8);
  box-shadow: 0 0 0 4px rgba(24, 167, 218, 0.12);
}

@media (max-width: 980px) {
  .profile-edit-page .profile-edit-workspace {
    grid-template-columns: 1fr;
  }

  .profile-edit-page .profile-form-grid,
  .profiles-page .profile-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profiles-page .profile-event-grid {
    grid-template-columns: 1fr;
  }

  .profiles-page .profile-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profiles-page .profile-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .profile-edit-page .profile-form-grid,
  .profiles-page .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profiles-page .profile-pic-field {
    grid-column: auto;
  }

  .profile-edit-page .profile-status-field {
    grid-column: auto;
  }

  .profiles-page .profile-company-group-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profiles-page .profile-pic-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profiles-page .profile-search-form {
    grid-template-columns: 1fr;
  }

  .profiles-page .profile-filter-grid {
    grid-template-columns: 1fr;
  }

  .profiles-page .profile-view-grid {
    grid-template-columns: 1fr;
  }

  .profiles-page .profile-filter-actions {
    display: grid;
  }

  .profiles-page .profile-list li {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .profiles-page .profile-row-previews {
    grid-template-columns: 64px;
  }

  .profiles-page .profile-row-previews img,
  .profiles-page .profile-row-preview-empty {
    width: 64px;
  }

  .profiles-page .profile-edit-link {
    width: 100%;
  }
}

.empty-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-bottom: 6px;
  border: 1px solid rgba(21, 159, 211, 0.26);
  border-radius: 999px;
  background: rgba(21, 159, 211, 0.12);
  color: #42c2ef;
  font-size: 24px;
  font-weight: 900;
}

/* Compact Rekognition face results */
.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar {
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border-color: rgba(103, 217, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 24px rgba(0, 0, 0, 0.16);
}

.search-page:not(.ecrs-page) .result-mode-panel > .results-heading,
.search-page:not(.ecrs-page) .atmosphere-heading {
  display: grid;
  justify-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.search-page:not(.ecrs-page) .result-mode-panel > .results-heading > div,
.search-page:not(.ecrs-page) .atmosphere-heading > div {
  display: grid;
  justify-items: center;
}

.search-page:not(.ecrs-page) .atmosphere-content-heading {
  display: grid;
  justify-items: center;
  justify-content: center;
  text-align: center;
}

.search-page:not(.ecrs-page) .atmosphere-content-heading > span {
  justify-self: center;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar-meta {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar-meta strong {
  font-size: 14px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar-meta span {
  display: none;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .view-toggle {
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding: 2px;
  border-radius: 7px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .view-toggle-button {
  min-width: 62px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar-actions .button {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] #downloadSelectedMatches {
  min-width: 128px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-status {
  min-height: 14px;
  font-size: 12px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-status:empty {
  display: none;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-match {
  position: relative;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-match:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-media img {
  aspect-ratio: 4 / 3;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-select {
  top: 8px;
  left: 8px;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-checkbox {
  width: 14px;
  height: 14px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .similarity-badge {
  right: 8px;
  bottom: 8px;
  min-height: 24px;
  padding: 4px 7px;
  font-size: 11px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-match .match-body {
  gap: 8px;
  padding: 9px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-details {
  gap: 1px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-details span {
  font-size: 10px;
  letter-spacing: 0;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-details strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .match-download {
  min-height: 32px;
  margin-top: 0;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact .match-media img {
  aspect-ratio: 1 / 1;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact .premium-match .match-body {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 3;
  display: block;
  padding: 0;
  pointer-events: none;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact .match-download {
  width: 100%;
  min-height: 27px;
  padding: 5px 7px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 13, 16, 0.68);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact .similarity-badge {
  top: 7px;
  right: 7px;
  bottom: auto;
}

.search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact .match-select {
  top: 7px;
  left: 7px;
  min-height: 26px;
  padding: 5px 7px;
}

@media (max-width: 760px) {
  .search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .download-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .view-toggle,
  .search-page:not(.ecrs-page) [data-result-mode-panel="matches"] #downloadSelectedMatches {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 10px;
  }

  .search-page:not(.ecrs-page) [data-result-mode-panel="matches"] .premium-gallery.is-compact {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 7px;
  }
}

@keyframes previewFadeIn {
  from {
    opacity: 0;
    transform: scale(1.025);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 560px) {
  .search-page .search-hero {
    padding: 20px;
  }

  .search-page .search-hero h2 {
    font-size: 26px;
  }

  .ecrs-page .search-hero {
    min-height: 250px;
    padding: 26px 18px;
  }

  .ecrs-page .hero-logo {
    width: 180px;
    margin-bottom: 18px;
  }

  .ecrs-page .search-hero h2 {
    max-width: 330px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    font-size: 31px;
    line-height: 1.06;
  }

  .ecrs-page .search-hero h2::after {
    width: 170px;
    margin-top: 7px;
  }

  .ecrs-page .ecrs-profile-results {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 12px;
  }
}

/* ECRS premium hero card - final override */
.search-page.ecrs-page .search-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(92px, 10vw, 122px);
  padding: clamp(14px, 1.8vw, 22px) clamp(18px, 4vw, 48px);
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(251, 146, 60, 0.13), transparent 22%),
    linear-gradient(315deg, rgba(56, 189, 248, 0.22), transparent 26%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #061017 0%, #071923 46%, #03070d 100%);
  box-shadow:
    0 26px 70px rgba(2, 8, 23, 0.46),
    0 0 36px rgba(14, 165, 233, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #f8fcff;
  text-align: center;
}

.search-page.ecrs-page .search-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(251, 146, 60, 0.28), transparent 35%),
    radial-gradient(120% 80% at 100% 100%, rgba(56, 189, 248, 0.32), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%);
  box-shadow: inset 0 0 34px rgba(125, 211, 252, 0.08);
}

.search-page.ecrs-page .search-hero::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -72%;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  box-shadow:
    -18px -18px 0 -17px rgba(56, 189, 248, 0.26),
    -42px -42px 0 -41px rgba(56, 189, 248, 0.18),
    -70px -70px 0 -69px rgba(56, 189, 248, 0.12);
}

.search-page.ecrs-page .ecrs-brand-lockup {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(150px, 28%);
  align-items: center;
  gap: clamp(14px, 3vw, 38px);
  width: 100%;
}

.search-page.ecrs-page .ecrs-directory-people {
  display: grid;
  width: clamp(64px, 8vw, 88px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(80, 196, 255, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, rgba(79, 205, 255, 0.32), rgba(4, 35, 67, 0.78) 58%, rgba(1, 9, 22, 0.98));
  color: #8bdcff;
  box-shadow: 0 0 0 6px rgba(18, 137, 218, 0.08), 0 0 28px rgba(0, 174, 255, 0.48), inset 0 0 22px rgba(62, 193, 255, 0.2);
}

.search-page.ecrs-page .ecrs-directory-people svg { width: 62%; height: 62%; filter: drop-shadow(0 0 8px rgba(89, 207, 255, 0.5)); }
.search-page.ecrs-page .ecrs-directory-copy {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: baseline;
  justify-content: start;
  justify-items: start;
  gap: 0 clamp(10px, 1.4vw, 18px);
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}
.search-page.ecrs-page .ecrs-directory-copy strong {
  background: linear-gradient(180deg, #ffffff 0%, #e8f8ff 58%, #a9e7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(22px, 3.6vw, 43px);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 0.9;
  text-transform: uppercase;
  filter: drop-shadow(0 8px 18px rgba(24, 174, 235, 0.2));
}
.search-page.ecrs-page .ecrs-directory-copy b {
  margin-top: 0;
  color: #28bfff;
  font-size: clamp(22px, 3.6vw, 43px);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0, 174, 255, 0.46);
}
.search-page.ecrs-page .ecrs-directory-globe { align-self: stretch; display: grid; place-items: center; overflow: hidden; opacity: 0.82; }
.search-page.ecrs-page .ecrs-directory-globe svg { width: min(220px, 130%); color: #168fda; stroke: currentColor; stroke-width: 0.8; filter: drop-shadow(0 0 7px rgba(0, 174, 255, 0.55)); }
.search-page.ecrs-page .ecrs-directory-globe circle { fill: #55d6ff; stroke: none; filter: drop-shadow(0 0 4px #39c9ff); }

.search-page.ecrs-page .ecrs-brand-directory {
  display: grid;
  grid-template-columns: minmax(34px, 88px) auto minmax(34px, 88px);
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 22px);
  width: min(720px, 100%);
}

.search-page.ecrs-page .ecrs-brand-directory span {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.78), rgba(251, 191, 36, 0.68), transparent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.search-page.ecrs-page .ecrs-brand-directory strong {
  background: linear-gradient(180deg, #fff 0%, #eaf8ff 48%, #80d9fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(16px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: clamp(0.08em, 0.7vw, 0.18em);
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  filter: drop-shadow(0 8px 16px rgba(56, 189, 248, 0.22));
}

.search-page.ecrs-page .hero-logo {
  width: clamp(176px, 30vw, 330px);
  max-width: 78%;
  margin: 0;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.34));
}

.search-page.ecrs-page .ecrs-brand-kicker,
.search-page.ecrs-page .ecrs-brand-system {
  display: grid;
  grid-template-columns: minmax(34px, 88px) auto minmax(34px, 88px);
  gap: clamp(12px, 2vw, 22px);
  align-items: center;
  justify-content: center;
  width: min(720px, 100%);
}

.search-page.ecrs-page .ecrs-brand-kicker span,
.search-page.ecrs-page .ecrs-brand-system span {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.84), transparent);
}

.search-page.ecrs-page .ecrs-brand-system span {
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.72), transparent);
}

.search-page.ecrs-page .ecrs-brand-kicker strong,
.search-page.ecrs-page .ecrs-brand-system strong {
  color: rgba(226, 246, 255, 0.92);
  font-size: clamp(12px, 1.9vw, 20px);
  font-weight: 850;
  letter-spacing: clamp(0.18em, 1.4vw, 0.42em);
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.24);
  white-space: nowrap;
}

.search-page.ecrs-page .search-hero h2 {
  margin: -2px 0 0;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #e7f8ff 42%, #29baf2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: 100%;
  max-width: 100%;
  font-size: clamp(18px, 2.9vw, 32px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: none;
  filter: drop-shadow(0 18px 24px rgba(14, 165, 233, 0.24));
  overflow-wrap: normal;
  white-space: nowrap;
}

.search-page.ecrs-page .search-hero h2::after {
  content: none;
}

.search-page.ecrs-page .ecrs-brand-system strong {
  color: #eaf8ff;
  font-size: clamp(16px, 2.4vw, 28px);
}

@media (max-width: 620px) {
  .search-page.ecrs-page .search-hero {
    min-height: 82px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .search-page.ecrs-page .search-hero::before {
    inset: 0;
    border-radius: inherit;
  }

  .search-page.ecrs-page .hero-logo {
    width: min(220px, 70vw);
    max-width: 100%;
  }

  .search-page.ecrs-page .ecrs-brand-directory {
    grid-template-columns: minmax(18px, 36px) auto minmax(18px, 36px);
    gap: 7px;
  }

  .search-page.ecrs-page .ecrs-brand-directory strong {
    font-size: 17px;
    letter-spacing: 0.08em;
  }

  .search-page.ecrs-page .ecrs-brand-lockup {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
  }

  .search-page.ecrs-page .ecrs-directory-people { width: 50px; }
  .search-page.ecrs-page .ecrs-directory-copy {
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: start;
    gap: 0 7px;
    white-space: nowrap;
  }
  .search-page.ecrs-page .ecrs-directory-copy strong {
    font-size: clamp(15px, 4.6vw, 19px);
    line-height: 1;
  }
  .search-page.ecrs-page .ecrs-directory-copy b {
    margin-top: 0;
    font-size: clamp(15px, 4.6vw, 19px);
    letter-spacing: 0.08em;
    line-height: 1;
  }
  .search-page.ecrs-page .ecrs-directory-globe { display: none; }

  .search-page.ecrs-page .ecrs-brand-kicker,
  .search-page.ecrs-page .ecrs-brand-system {
    grid-template-columns: minmax(28px, 52px) auto minmax(28px, 52px);
    gap: 8px;
  }

  .search-page.ecrs-page .ecrs-brand-kicker strong {
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .search-page.ecrs-page .search-hero h2 {
    font-size: clamp(18px, 6vw, 24px);
  }

  .search-page.ecrs-page .ecrs-brand-system strong {
    font-size: 17px;
    letter-spacing: 0.28em;
  }
}

/* ECRS feature mode cards - final override */
.search-page.ecrs-page .ecrs-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-mode-tab {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(4, 12, 18, 0.78);
  color: rgba(226, 232, 240, 0.84);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 14px 34px rgba(2, 8, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-page.ecrs-page .ecrs-mode-tab::before,
.search-page.ecrs-page .ecrs-mode-tab::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.search-page.ecrs-page .ecrs-mode-tab::before {
  inset: 0;
  background: radial-gradient(90px 64px at 100% 100%, var(--mode-glow, rgba(56, 189, 248, 0.18)), transparent 70%);
  opacity: 0.78;
}

.search-page.ecrs-page .ecrs-mode-tab::after {
  right: 15px;
  bottom: 15px;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--mode-dot, rgba(56, 189, 248, 0.22));
  box-shadow: 0 0 24px var(--mode-dot-shadow, rgba(56, 189, 248, 0.28));
}

.search-page.ecrs-page .ecrs-mode-tab:hover {
  transform: translateY(-1px);
}

.search-page.ecrs-page .ecrs-mode-tab-face {
  order: 2;
  --mode-glow: rgba(56, 189, 248, 0.2);
  --mode-dot: rgba(56, 189, 248, 0.22);
  --mode-dot-shadow: rgba(56, 189, 248, 0.34);
  border-color: rgba(56, 189, 248, 0.38);
  background:
    linear-gradient(145deg, rgba(14, 165, 233, 0.16), rgba(14, 165, 233, 0.035)),
    rgba(4, 14, 22, 0.86);
}

.search-page.ecrs-page .ecrs-mode-tab-data {
  order: 1;
  --mode-glow: rgba(251, 191, 36, 0.22);
  --mode-dot: rgba(251, 191, 36, 0.2);
  --mode-dot-shadow: rgba(251, 191, 36, 0.34);
  border-color: rgba(251, 191, 36, 0.38);
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.03)),
    rgba(15, 12, 8, 0.86);
}

.search-page.ecrs-page .ecrs-mode-tab-face.is-active {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow:
    0 16px 36px rgba(14, 165, 233, 0.18),
    0 0 0 1px rgba(56, 189, 248, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search-page.ecrs-page .ecrs-mode-tab-data.is-active {
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow:
    0 16px 36px rgba(245, 158, 11, 0.18),
    0 0 0 1px rgba(251, 191, 36, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search-page.ecrs-page .ecrs-mode-icon,
.search-page.ecrs-page .ecrs-mode-copy {
  position: relative;
  z-index: 1;
}

.search-page.ecrs-page .ecrs-mode-icon {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 24px currentColor;
}

.search-page.ecrs-page .ecrs-mode-tab-face .ecrs-mode-icon {
  color: #38bdf8;
}

.search-page.ecrs-page .ecrs-mode-tab-data .ecrs-mode-icon {
  color: #fbbf24;
}

.search-page.ecrs-page .ecrs-mode-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-page.ecrs-page .ecrs-mode-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.search-page.ecrs-page .ecrs-mode-copy strong {
  display: block;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
  white-space: nowrap;
}

.search-page.ecrs-page .ecrs-mode-copy small {
  display: block;
  color: rgba(203, 213, 225, 0.7);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-mode-tabs {
    gap: 8px;
  }

  .search-page.ecrs-page .ecrs-mode-tab {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    min-height: 70px;
    padding: 10px 9px;
    border-radius: 8px;
  }

  .search-page.ecrs-page .ecrs-mode-tab::after {
    right: 10px;
    bottom: 10px;
    width: 18px;
  }

  .search-page.ecrs-page .ecrs-mode-icon {
    width: 38px;
    border-radius: 8px;
  }

  .search-page.ecrs-page .ecrs-mode-icon svg {
    width: 24px;
    height: 24px;
  }

  .search-page.ecrs-page .ecrs-mode-copy strong {
    font-size: 12.5px;
    letter-spacing: 0;
  }

  .search-page.ecrs-page .ecrs-mode-copy small {
    font-size: 9.5px;
  }
}

/* ECRS data-search results - final compact override */
.search-page.ecrs-page .ecrs-filter-panel .profile-list {
  gap: 6px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list li {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 62px;
  padding: 7px 10px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card {
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.1);
  background: #08090a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card:hover {
  border-color: rgba(255, 255, 255, 0.17);
  background: #0c0d0f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card:focus-visible {
  outline: 3px solid rgba(103, 217, 255, 0.36);
  outline-offset: 2px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card.is-expanded {
  border-color: rgba(255, 255, 255, 0.12);
  background: #08090a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-row-previews {
  grid-template-columns: 48px;
  gap: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-row-previews img,
.search-page.ecrs-page .ecrs-filter-panel .profile-row-preview-empty {
  width: 48px;
  border-radius: 6px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-image-preview-button {
  display: block;
  width: 48px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-image-preview-button:focus-visible {
  outline: 3px solid rgba(103, 217, 255, 0.5);
  outline-offset: 2px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-image-preview-button img {
  display: block;
  transition: transform 160ms ease, filter 160ms ease;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-image-preview-button:hover img,
.search-page.ecrs-page .ecrs-filter-panel .profile-image-preview-button:focus-visible img {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-main {
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-main > strong,
.search-page.ecrs-page .ecrs-filter-panel .profile-list-main > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-main .profile-list-position {
  color: #8edfff;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-main .profile-list-company {
  color: #c8b9ff;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-main .profile-list-tier {
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border: 1px solid rgba(245, 189, 54, 0.2);
  border-radius: 999px;
  background: rgba(245, 189, 54, 0.08);
  color: #f5d477;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-badges .profile-list-tier {
  margin-top: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-status.is-active {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(34, 197, 94, 0.13);
  color: #70e89a;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-list-status.is-inactive {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(239, 68, 68, 0.13);
  color: #ff8b8b;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-card-affordance {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 8px 5px 10px;
  border: 1px solid rgba(103, 217, 255, 0.16);
  border-radius: 999px;
  background: rgba(103, 217, 255, 0.075);
  color: rgba(216, 247, 255, 0.74);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-card-affordance i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-card-affordance-close {
  display: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card:hover .profile-card-affordance,
.search-page.ecrs-page .ecrs-filter-panel .profile-data-card:focus-visible .profile-card-affordance,
.search-page.ecrs-page .ecrs-filter-panel .profile-data-card.is-expanded .profile-card-affordance {
  border-color: rgba(103, 217, 255, 0.32);
  background: rgba(103, 217, 255, 0.14);
  color: #e9fbff;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card.is-expanded .profile-card-affordance-open {
  display: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card.is-expanded .profile-card-affordance-close {
  display: inline;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-data-card.is-expanded .profile-card-affordance i {
  transform: translateY(2px) rotate(225deg);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin: 6px -10px -7px;
  padding: 10px;
  border: 0;
  border-radius: 0 0 8px 8px;
  background: #292b2f;
  box-shadow: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-panel[hidden] {
  display: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-heading,
.search-page.ecrs-page .ecrs-filter-panel .profile-view-events > span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d8f7ff;
  font-size: 12px;
  font-weight: 900;
}

.search-page.ecrs-page .ecrs-filter-panel button.profile-view-section-heading {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #222428;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.search-page.ecrs-page .ecrs-filter-panel button.profile-view-section-heading:hover,
.search-page.ecrs-page .ecrs-filter-panel button.profile-view-section-heading:focus-visible {
  border-color: rgba(103, 217, 255, 0.24);
  background: rgba(103, 217, 255, 0.07);
  outline: none;
}

.search-page.ecrs-page .ecrs-filter-panel button.profile-view-section-heading::before {
  display: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid rgba(82, 151, 219, 0.42);
  border-radius: 7px;
  background: #12345a;
  color: #ffffff;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-heading > i {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid rgba(216, 247, 255, 0.72);
  border-bottom: 2px solid rgba(216, 247, 255, 0.72);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-heading[aria-expanded="true"] > i {
  transform: translateY(2px) rotate(225deg);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-body[hidden] {
  display: none;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-section-heading::before,
.search-page.ecrs-page .ecrs-filter-panel .profile-view-events > span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #67d9ff;
  box-shadow: 0 0 14px rgba(103, 217, 255, 0.62);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-category {
  display: grid;
  gap: 7px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-empty {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.48);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 5px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #12345a;
  color: #fff;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field span {
  color: rgba(216, 247, 255, 0.54);
  font-size: 9px;
  letter-spacing: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field span.profile-view-field-icon {
  color: #ffffff;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-field strong {
  color: rgba(255, 255, 255, 0.93);
  font-size: 11px;
  line-height: 1.35;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-focus-grid .profile-view-field {
  min-height: 34px;
  padding: 6px 9px;
  border-color: rgba(103, 217, 255, 0.12);
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-focus-grid .profile-view-field span {
  color: rgba(216, 247, 255, 0.58);
  font-size: 11px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-focus-grid .profile-view-field strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  text-align: left;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-events {
  gap: 6px;
  padding-top: 0;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-events > strong {
  padding: 10px 12px;
  border: 1px dashed rgba(103, 217, 255, 0.18);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 9px;
  align-items: start;
  max-width: none;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(103, 217, 255, 0.12);
  border-radius: 8px;
  background: rgba(21, 159, 211, 0.105);
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-event small {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-width: 48px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(103, 217, 255, 0.16);
  color: #baf1ff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-event strong {
  grid-column: 2;
  min-width: 0;
  overflow: visible;
  color: #eefcff;
  font-size: 13px;
  line-height: 1.32;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.search-page.ecrs-page .ecrs-filter-panel .profile-view-event em {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.is-profile-image-modal-open {
  overflow: hidden;
}

.profile-image-modal[hidden] {
  display: none;
}

.profile-image-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 42px);
  box-sizing: border-box;
}

.profile-image-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(1, 5, 8, 0.84);
  backdrop-filter: blur(12px) saturate(0.75);
  cursor: zoom-out;
  animation: profileImageBackdropIn 180ms ease both;
}

.profile-image-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: fit-content;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  margin: auto;
  padding: 8px;
  border: 1px solid rgba(103, 217, 255, 0.3);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(103, 217, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(3, 10, 14, 0.94);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.035);
  animation: profileImageDialogIn 220ms cubic-bezier(.2, .8, .2, 1) both;
  scrollbar-color: rgba(103, 217, 255, 0.38) transparent;
}

.profile-image-modal-dialog:has(.profile-image-modal-business-cards:not([hidden])) {
  width: min(920px, 100%);
  padding: 16px;
  gap: 4px;
}

.profile-image-modal-dialog img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - clamp(52px, 9vw, 100px));
  max-height: calc(100dvh - clamp(100px, 14vw, 150px));
  margin: auto;
  border-radius: 10px;
  object-fit: contain;
}

.profile-image-modal-dialog:has(.profile-image-modal-business-cards:not([hidden])) > #profileImageModalImage {
  max-width: min(640px, 100%);
  max-height: 52dvh;
}

.profile-image-modal-customer-name {
  display: block;
  padding: 12px 10px 6px;
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.profile-image-modal-business-cards {
  width: 100%;
  padding: 18px 0 0;
  border-top: 1px solid rgba(103, 217, 255, 0.18);
  box-sizing: border-box;
}

.profile-image-modal-business-cards > strong {
  display: block;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-image-modal-business-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.profile-image-modal-business-card-grid figure {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-image-modal-business-card-grid figcaption {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-image-modal-dialog .profile-image-modal-business-card-grid img {
  width: 100%;
  max-width: 100%;
  max-height: 72dvh;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  object-fit: contain;
}

.profile-image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(103, 217, 255, 0.3);
  border-radius: 999px;
  background: rgba(4, 12, 18, 0.96);
  color: #dff9ff;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.profile-image-modal-close:hover,
.profile-image-modal-close:focus-visible {
  border-color: rgba(103, 217, 255, 0.62);
  color: #fff;
  outline: none;
  background: rgba(10, 29, 38, 0.98);
  transform: scale(1.06);
}

.profile-image-modal-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
  stroke-linecap: round;
}

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

@keyframes profileImageDialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .profile-image-modal {
    padding: 18px;
  }

  .profile-image-modal-dialog {
    padding: 6px;
    border-radius: 12px;
  }

  .profile-image-modal-dialog img {
    max-width: calc(100vw - 48px);
    max-height: calc(100dvh - 104px);
    border-radius: 8px;
  }

  .profile-image-modal-close {
    top: 8px;
    right: 8px;
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .profile-image-modal-dialog:has(.profile-image-modal-business-cards:not([hidden])) {
    padding: 10px;
  }

  .profile-image-modal-business-card-grid figure {
    padding: 8px;
  }
}

@media (max-width: 760px) {
  .search-page.ecrs-page .ecrs-filter-panel .profile-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-page.ecrs-page .ecrs-filter-panel .profile-view-event-list {
    grid-template-columns: 1fr;
  }
}

.profile-events-page .event-time-control {
  position: relative;
}

.profile-events-page .event-time-control::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid #75dcfa;
  border-radius: 50%;
  opacity: 0.85;
  pointer-events: none;
  transform: translateY(-50%);
}

.profile-events-page .event-time-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 21px;
  z-index: 2;
  width: 5px;
  height: 6px;
  border-bottom: 1.5px solid #75dcfa;
  border-left: 1.5px solid #75dcfa;
  pointer-events: none;
  transform: translateY(-65%);
}

.profile-events-page .event-time-input {
  width: 100%;
  min-height: 50px;
  padding: 11px 48px 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  color-scheme: dark;
  font: inherit;
  outline: 0;
}

.profile-events-page .event-edit-form .event-time-input {
  min-height: 44px;
  padding-block: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.profile-events-page .event-time-input:focus {
  border-color: rgba(21, 159, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(21, 159, 211, 0.14);
}

.profile-events-page .event-time-input::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  width: 48px;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.profile-events-page .event-agenda-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.profile-events-page .event-agenda-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px dashed rgba(103, 217, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(103, 217, 255, 0.09), rgba(255, 255, 255, 0.035));
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.profile-events-page .event-agenda-picker:hover,
.profile-events-page .event-agenda-upload input:focus-visible + .event-agenda-picker {
  border-color: rgba(103, 217, 255, 0.68);
  background: linear-gradient(135deg, rgba(103, 217, 255, 0.16), rgba(255, 255, 255, 0.055));
  outline: none;
  transform: translateY(-1px);
}

.profile-events-page .event-agenda-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(103, 217, 255, 0.3);
  border-radius: 7px;
  background: rgba(21, 159, 211, 0.14);
  color: #75dcfa;
  font-size: 23px;
  font-weight: 400;
}

.profile-events-page .event-agenda-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-events-page .event-agenda-copy strong,
.profile-events-page .event-agenda-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-events-page .event-agenda-copy strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}

.profile-events-page .event-agenda-copy small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.profile-events-page .event-agenda-action {
  padding: 7px 10px;
  border: 1px solid rgba(103, 217, 255, 0.28);
  border-radius: 6px;
  background: rgba(21, 159, 211, 0.14);
  color: #bcefff;
  font-size: 11px;
  font-weight: 800;
}

.profile-events-page .event-agenda-upload.has-file .event-agenda-picker {
  border-style: solid;
  border-color: rgba(54, 211, 153, 0.46);
  background: rgba(54, 211, 153, 0.09);
}

.profile-events-page .event-agenda-upload.has-file .event-agenda-icon {
  border-color: rgba(54, 211, 153, 0.4);
  background: rgba(54, 211, 153, 0.14);
  color: #8df4cb;
}

.profile-events-page .event-agenda-current {
  display: inline-block;
  margin-top: 7px;
  color: #75dcfa;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.profile-events-page .event-agenda-current:hover {
  color: #c6f3ff;
  text-decoration: underline;
}

.event-date-picker {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.event-date-picker [data-date-display] {
  width: 100%;
  min-width: 0;
}

.event-date-picker button {
  display: grid;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(103, 217, 255, 0.3);
  border-radius: 6px;
  background: rgba(103, 217, 255, 0.1);
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.event-date-picker button:hover,
.event-date-picker button:focus-visible {
  border-color: rgba(103, 217, 255, 0.62);
  background: rgba(103, 217, 255, 0.18);
  color: #dff9ff;
  outline: none;
}

.event-date-picker [data-date-native] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.event-date-format {
  display: block;
  margin-top: 5px;
  opacity: 0.68;
}

@media (max-width: 1100px) {
  .profile-events-page .event-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-events-page .event-edit-form .button.primary {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .profile-events-page .event-edit-form {
    grid-template-columns: 1fr;
  }

  .profile-events-page .event-edit-form .button.primary {
    grid-column: auto;
    width: 100%;
  }
}

.ecrs-upcoming-panel {
  margin-bottom: 10px;
  padding: 11px 12px;
  border-color: rgba(255, 190, 45, 0.25);
  background: linear-gradient(145deg, rgba(31, 25, 9, 0.92), rgba(5, 15, 20, 0.96));
}

.search-page .ecrs-upcoming-inline {
  position: static;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 8px 0 16px;
  padding: 5px;
  overflow: visible;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-list {
  margin-top: 0;
  gap: 5px;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-card {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-calendar {
  min-height: 32px;
  border-radius: 6px;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-calendar strong {
  font-size: 0.82rem;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-calendar small {
  margin-top: 1px;
  font-size: 0.43rem;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-copy {
  gap: 1px;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-copy strong {
  font-size: 0.75rem;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-copy small {
  font-size: 0.58rem;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-copy em {
  font-size: 0.56rem;
}

.search-page .ecrs-upcoming-inline .ecrs-upcoming-arrow {
  font-size: 1rem;
}

.ecrs-upcoming-inline[hidden] {
  display: none !important;
}

.ecrs-upcoming-launcher[aria-expanded="true"] .ecrs-upcoming-launcher-arrow {
  transform: rotate(180deg);
}

.ecrs-upcoming-launcher-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(245, 189, 54, 0.25);
  border-radius: 50%;
  background: rgba(245, 189, 54, 0.08);
  transition: transform 220ms ease, border-color 180ms ease, background 180ms ease;
}

.ecrs-upcoming-launcher-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ecrs-upcoming-launcher:hover .ecrs-upcoming-launcher-arrow {
  border-color: rgba(245, 189, 54, 0.55);
  background: rgba(245, 189, 54, 0.16);
}

.ecrs-upcoming-launcher {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(245, 189, 54, 0.28);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(102, 69, 6, 0.28), rgba(5, 17, 22, 0.96) 62%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.17), inset 0 1px rgba(255, 224, 138, 0.04);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.ecrs-upcoming-launcher:hover,
.ecrs-upcoming-launcher:focus-visible {
  border-color: rgba(245, 189, 54, 0.55);
  background: linear-gradient(135deg, rgba(137, 92, 7, 0.36), rgba(5, 17, 22, 0.98) 68%);
  outline: none;
  transform: translateY(-1px);
}

.ecrs-upcoming-launcher-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(245, 189, 54, 0.32), rgba(126, 80, 0, 0.28));
  color: #ffd05b;
}
.ecrs-upcoming-launcher-icon svg { width: 20px; height: 20px; stroke-width: 1.7; }
.ecrs-upcoming-launcher-copy { display: grid; min-width: 0; gap: 2px; }
.ecrs-upcoming-launcher-copy strong { font-size: 0.83rem; }
.ecrs-upcoming-launcher-copy small { overflow: hidden; color: rgba(255, 255, 255, 0.57); font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.ecrs-upcoming-launcher em { display: grid; min-width: 25px; height: 25px; place-items: center; border-radius: 999px; background: rgba(245, 189, 54, 0.16); color: #ffd35e; font-size: 0.72rem; font-style: normal; font-weight: 850; }
.ecrs-upcoming-launcher-arrow { color: #f5bd36; line-height: 1; }
.ecrs-upcoming-notification {
  display: grid;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  place-items: center;
  border: 1px solid rgba(245, 189, 54, 0.32);
  border-radius: 999px;
  background: rgba(245, 189, 54, 0.14);
  box-sizing: border-box;
}
.ecrs-upcoming-notification > strong {
  color: #ffd35e;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.ecrs-upcoming-drawer[hidden] { display: none !important; }
.ecrs-upcoming-drawer { position: fixed; z-index: 1000; inset: 0; display: flex; justify-content: flex-end; }
.ecrs-upcoming-drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0, 6, 9, 0.66); backdrop-filter: blur(5px); cursor: default; animation: ecrsDrawerFadeIn 180ms ease both; }
.ecrs-upcoming-drawer .ecrs-upcoming-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  height: 100%;
  margin: 0;
  padding: 22px 18px;
  overflow-y: auto;
  border-width: 0 0 0 1px;
  border-radius: 0;
  box-shadow: -28px 0 65px rgba(0, 0, 0, 0.38);
  animation: ecrsDrawerSlideIn 260ms cubic-bezier(.2, .8, .2, 1) both;
}
.ecrs-upcoming-drawer .ecrs-upcoming-list {
  display: grid;
  grid-template-columns: 1fr;
  max-height: min(30vh, 260px);
  padding-right: 3px;
  padding-bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-block: contain;
  scrollbar-width: thin;
  scroll-snap-type: y proximity;
}
.ecrs-upcoming-drawer .ecrs-upcoming-card {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 8px;
  scroll-snap-align: start;
}
.ecrs-upcoming-drawer .ecrs-upcoming-calendar {
  min-height: 34px;
  border-radius: 7px;
}
.ecrs-upcoming-drawer .ecrs-upcoming-calendar strong { font-size: 0.86rem; }
.ecrs-upcoming-drawer .ecrs-upcoming-calendar small { font-size: 0.45rem; }
.ecrs-upcoming-drawer .ecrs-upcoming-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 7px;
  row-gap: 1px;
}
.ecrs-upcoming-drawer .ecrs-upcoming-copy > strong { grid-column: 1 / -1; font-size: 0.76rem; }
.ecrs-upcoming-drawer .ecrs-upcoming-copy > small { overflow: hidden; font-size: 0.6rem; text-overflow: ellipsis; white-space: nowrap; }
.ecrs-upcoming-drawer .ecrs-upcoming-copy > em { font-size: 0.58rem; white-space: nowrap; }
.ecrs-upcoming-drawer .ecrs-upcoming-arrow { font-size: 1.05rem; }
.has-upcoming-drawer { overflow: hidden; }
.ecrs-upcoming-heading-actions { display: flex; align-items: center; gap: 8px; }
.ecrs-upcoming-heading-actions > button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid rgba(245, 189, 54, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(245, 189, 54, 0.12), rgba(255, 255, 255, 0.035));
  color: #ffe29a;
  font-family: Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.07);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.ecrs-upcoming-heading-actions > button:hover,
.ecrs-upcoming-heading-actions > button:focus-visible {
  border-color: rgba(245, 189, 54, 0.65);
  background: linear-gradient(145deg, rgba(245, 189, 54, 0.24), rgba(137, 91, 0, 0.12));
  color: #fff4d2;
  outline: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24), 0 0 0 3px rgba(245, 189, 54, 0.08);
  transform: rotate(6deg) scale(1.04);
}
.ecrs-upcoming-heading-actions > button:active {
  transform: scale(0.94);
}

@keyframes ecrsDrawerFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ecrsDrawerSlideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }

.ecrs-data-switcher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
  padding: 5px;
  border: 1px solid rgba(103, 217, 255, 0.13);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(7, 19, 26, 0.96), rgba(2, 9, 13, 0.98));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.025);
}

.ecrs-data-switch {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(226, 244, 249, 0.68);
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ecrs-data-switch:hover { color: #fff; }
.ecrs-data-switch.is-active {
  border-color: rgba(103, 217, 255, 0.28);
  background: linear-gradient(135deg, rgba(20, 111, 141, 0.3), rgba(9, 49, 64, 0.44));
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.05);
}

.ecrs-data-switch:first-child.is-active {
  border-color: rgba(245, 189, 54, 0.32);
  background: linear-gradient(135deg, rgba(154, 104, 6, 0.3), rgba(71, 48, 4, 0.42));
}

.ecrs-data-switch-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(103, 217, 255, 0.09);
}
.ecrs-data-switch:first-child .ecrs-data-switch-icon { background: rgba(245, 189, 54, 0.1); }
.ecrs-data-switch-icon svg { width: 19px; height: 19px; stroke-width: 1.7; }
.ecrs-data-switch > span:nth-child(2) { display: grid; min-width: 0; gap: 1px; }
.ecrs-data-switch strong { overflow: hidden; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.ecrs-data-switch small { overflow: hidden; color: rgba(220, 239, 245, 0.48); font-size: 0.61rem; text-overflow: ellipsis; white-space: nowrap; }
.ecrs-data-switch em { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 999px; background: rgba(245, 189, 54, 0.15); color: #ffd66b; font-size: 0.68rem; font-style: normal; font-weight: 800; }

.ecrs-data-subpanel[hidden] { display: none !important; }
.ecrs-data-subpanel.is-entering { animation: ecrsDataPanelIn 240ms ease both; }
@keyframes ecrsDataPanelIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ecrs-upcoming-heading,
.ecrs-upcoming-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ecrs-upcoming-heading > div:first-child {
  min-width: 0;
}

.ecrs-upcoming-heading h2 {
  padding: 0.18em 0 0.24em;
  overflow: visible;
  line-height: 1.32;
}

.ecrs-upcoming-detail-heading h3 {
  margin: 1px 0 0;
  font-size: 1rem;
}

.ecrs-upcoming-kicker,
.ecrs-upcoming-detail-heading span {
  color: #f5bd36;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.ecrs-upcoming-count {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(245, 189, 54, 0.34);
  border-radius: 50%;
  color: #ffd970;
  font-weight: 800;
}

.ecrs-upcoming-list {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  padding-bottom: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.ecrs-upcoming-featured-list {
  margin: 0 0 8px;
  overflow-x: visible;
}

.ecrs-upcoming-featured-list .ecrs-upcoming-card {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  flex: 1 1 0;
  gap: 6px;
  max-width: none;
  padding: 5px 7px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 25, 9, 0.94), rgba(5, 15, 20, 0.97));
  color: #fff;
}

.ecrs-upcoming-featured-list .ecrs-upcoming-calendar {
  min-height: 32px;
  border-radius: 6px;
}

.ecrs-upcoming-featured-list .ecrs-upcoming-calendar strong { font-size: 0.82rem; }
.ecrs-upcoming-featured-list .ecrs-upcoming-calendar small { margin-top: 1px; font-size: 0.43rem; }
.ecrs-upcoming-featured-list .ecrs-upcoming-copy { gap: 1px; }
.ecrs-upcoming-featured-list .ecrs-upcoming-copy strong { font-size: 0.75rem; }
.ecrs-upcoming-featured-list .ecrs-upcoming-copy small { color: rgba(255, 255, 255, 0.62); font-size: 0.58rem; }
.ecrs-upcoming-featured-list .ecrs-upcoming-copy em { color: #f5bd36; font-size: 0.56rem; }
.ecrs-upcoming-featured-list .ecrs-upcoming-arrow { font-size: 1rem; }

.search-page.ecrs-page .search-uploader .panel-heading h2,
.search-page.ecrs-page .ecrs-filter-panel .results-heading h2 {
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.2;
}

.ecrs-upcoming-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  flex: 0 0 clamp(220px, 38vw, 285px);
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.ecrs-upcoming-card.is-active,
.ecrs-upcoming-card:hover {
  border-color: rgba(245, 189, 54, 0.48);
  background: rgba(245, 189, 54, 0.09);
}

.ecrs-upcoming-calendar {
  display: grid;
  min-height: 38px;
  place-content: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #d9980b, #6f4900);
  color: #fff;
  text-align: center;
}

.ecrs-upcoming-calendar strong { font-size: 0.96rem; line-height: 1; }
.ecrs-upcoming-calendar small { margin-top: 2px; font-size: 0.5rem; }
.ecrs-upcoming-copy { display: grid; min-width: 0; gap: 2px; }
.ecrs-upcoming-copy strong { overflow: hidden; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.ecrs-upcoming-copy small { color: rgba(255, 255, 255, 0.62); font-size: 0.66rem; }
.ecrs-upcoming-copy em { color: #f5bd36; font-size: 0.62rem; font-style: normal; }
.ecrs-upcoming-arrow { color: #f5bd36; font-size: 1.25rem; }

.ecrs-upcoming-detail {
  margin-top: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(245, 189, 54, 0.2);
  scroll-margin-top: 12px;
}

.ecrs-upcoming-detail-heading small { color: rgba(255, 255, 255, 0.62); }
.ecrs-upcoming-detail-heading > a { display: grid; width: 28px; height: 28px; place-items: center; color: rgba(255, 255, 255, 0.7); font-size: 1.35rem; text-decoration: none; }
.ecrs-upcoming-attendees { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.ecrs-upcoming-attendees li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 7px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.ecrs-upcoming-attendees img,
.ecrs-upcoming-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: rgba(245, 189, 54, 0.14); object-fit: cover; color: #f5bd36; font-weight: 800; }
.ecrs-upcoming-attendees li > span:last-child { display: grid; min-width: 0; gap: 2px; }
.ecrs-upcoming-attendees li strong,
.ecrs-upcoming-attendees li small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecrs-upcoming-attendees small { color: rgba(255, 255, 255, 0.6); }
.ecrs-upcoming-empty { margin-top: 9px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.035); color: rgba(255, 255, 255, 0.65); text-align: center; }

@media (max-width: 520px) {
  .ecrs-data-switcher { position: sticky; top: 6px; z-index: 20; }
  .ecrs-data-switch { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; padding: 7px; }
  .ecrs-data-switch-icon { width: 30px; height: 30px; }
  .ecrs-data-switch small { display: none; }
  .ecrs-upcoming-panel { margin-inline: 0; padding: 5px; }
  .ecrs-upcoming-launcher { grid-template-columns: 34px minmax(0, 1fr) auto auto; padding: 7px 9px; }
  .ecrs-upcoming-launcher-icon { width: 34px; height: 34px; }
  .ecrs-upcoming-drawer { align-items: flex-end; }
  .ecrs-upcoming-drawer .ecrs-upcoming-panel { width: 100%; height: min(82vh, 720px); padding: 16px 12px max(18px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; box-shadow: 0 -28px 65px rgba(0, 0, 0, 0.42); animation-name: ecrsDrawerSheetIn; }
  .ecrs-upcoming-heading { align-items: flex-start; gap: 8px; }
  .ecrs-upcoming-heading h2 { margin: 0; padding-top: 0.22em; font-size: 1.12rem; line-height: 1.38; }
  .ecrs-upcoming-heading-actions { flex: 0 0 auto; padding-top: 2px; }
  .ecrs-upcoming-heading-actions > button { width: 36px; height: 36px; }
  .ecrs-upcoming-drawer .ecrs-upcoming-list { max-height: min(27vh, 220px); }
  .ecrs-upcoming-drawer .ecrs-upcoming-panel::before { content: ""; display: block; width: 42px; height: 4px; margin: -7px auto 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
  .ecrs-upcoming-card { flex-basis: min(78vw, 250px); }
  .ecrs-upcoming-featured-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .ecrs-upcoming-featured-list .ecrs-upcoming-card {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }
  .ecrs-upcoming-inline .ecrs-upcoming-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding-bottom: 0;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .ecrs-upcoming-inline .ecrs-upcoming-card {
    width: 100%;
    min-width: 0;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    flex-basis: auto;
  }
  .ecrs-upcoming-inline .ecrs-upcoming-copy small {
    white-space: normal;
  }
  .ecrs-upcoming-attendees { grid-template-columns: 1fr; max-height: 230px; overflow-y: auto; }
}

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

@media (max-width: 520px) {
  .search-page.ecrs-page .ecrs-filter-panel .profile-card-affordance {
    width: 30px;
    justify-content: center;
    padding: 0;
  }

  .search-page.ecrs-page .ecrs-filter-panel .profile-card-affordance span {
    display: none !important;
  }
}

/* Event calendar theme overrides (kept after the shared light panel rules). */
.search-page.event-calendar-page .event-calendar-panel {
  border: 1px solid rgba(103, 217, 255, 0.2);
  background:
    radial-gradient(circle at 50% 0%, rgba(21, 159, 211, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(24, 33, 39, 0.98), rgba(8, 14, 18, 0.99));
  color: #eefcff;
  box-shadow: 0 24px 60px rgba(4, 11, 16, 0.28);
  backdrop-filter: blur(18px);
}

.event-calendar-page .event-calendar-toolbar .button {
  border-color: rgba(103, 217, 255, 0.25);
  background: rgba(103, 217, 255, 0.08);
  color: #dff9ff;
}

.event-calendar-page .event-calendar-toolbar .button:hover,
.event-calendar-page .event-calendar-toolbar .button:focus-visible {
  border-color: rgba(103, 217, 255, 0.58);
  background: rgba(21, 159, 211, 0.2);
  color: #fff;
}

.event-calendar-page .event-calendar-toolbar p {
  color: #67d9ff;
}

.event-calendar-page .event-calendar-toolbar h2 {
  color: #fff;
}

.event-calendar-page .event-calendar-weekdays {
  border-color: rgba(103, 217, 255, 0.2);
  background: rgba(103, 217, 255, 0.075);
}

.event-calendar-page .event-calendar-weekdays span {
  color: rgba(223, 249, 255, 0.72);
}

.event-calendar-page .event-calendar-grid {
  border-color: rgba(103, 217, 255, 0.14);
  background: rgba(0, 0, 0, 0.1);
}

.event-calendar-page .event-calendar-day {
  border-color: rgba(103, 217, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.event-calendar-page .event-calendar-day:nth-child(7n + 6),
.event-calendar-page .event-calendar-day:nth-child(7n + 7) {
  background: rgba(103, 217, 255, 0.055);
}

.event-calendar-page .event-calendar-day.is-outside {
  background: rgba(0, 0, 0, 0.2);
}

.event-calendar-page .event-calendar-day > header strong {
  color: rgba(255, 255, 255, 0.8);
}

.event-calendar-page .event-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(103, 217, 255, 0.45);
  background: rgba(21, 159, 211, 0.09);
}

.event-calendar-page .event-calendar-event {
  border-color: rgba(103, 217, 255, 0.24);
  border-left-color: #67d9ff;
  background: linear-gradient(135deg, rgba(21, 159, 211, 0.24), rgba(21, 159, 211, 0.08));
  color: #fff;
}

.event-calendar-page .event-calendar-event small {
  color: rgba(223, 249, 255, 0.62);
}

/* Executive Directory full-width top bar */
.search-page.ecrs-page .ecrs-directory-bar {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  padding: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  background: linear-gradient(180deg, #181818, #121212);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.search-page.ecrs-page .ecrs-directory-bar strong {
  display: block;
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.search-page.ecrs-page > .search-shell {
  padding-top: 22px;
}

@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-directory-bar {
    min-height: 44px;
    padding-inline: 16px;
  }

  .search-page.ecrs-page .ecrs-directory-bar strong {
    width: 100%;
    margin-inline: 0;
    font-size: 12px;
  }

  .search-page.ecrs-page > .search-shell {
    padding-top: 16px;
  }
}

/* Keep the bottom navigation above the legacy mode-card rules. */
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 1200;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(640px, calc(100% - 36px));
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(103, 217, 255, 0.18);
  border-radius: 18px;
  background: rgba(10, 13, 16, 0.94);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.25);
  transform: translateX(-50%);
}

.search-page.ecrs-page .ecrs-mode-tab.ecrs-bottom-nav-item.is-active {
  border: 0;
  background: linear-gradient(135deg, rgba(21, 159, 211, 0.24), rgba(21, 159, 211, 0.08));
  color: #67d9ff;
  box-shadow: inset 0 0 0 1px rgba(103, 217, 255, 0.18);
}

@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav {
    left: 0;
    bottom: 0;
    width: 100%;
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 0;
    background: rgba(14, 14, 15, 0.97);
    transform: none;
  }
}

/* Public ECRS calendar */
.search-page.ecrs-calendar-page > .search-shell {
  padding-top: 24px;
}

.ecrs-calendar-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(103, 217, 255, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 0%, rgba(21, 159, 211, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ecrs-calendar-heading p,
.ecrs-calendar-heading h1,
.ecrs-calendar-heading span,
.ecrs-calendar-heading > strong,
.ecrs-calendar-heading > strong small {
  display: block;
  margin: 0;
}

.ecrs-calendar-heading p {
  margin-bottom: 4px;
  color: #67d9ff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.ecrs-calendar-heading h1 {
  color: #f4fcff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.ecrs-calendar-heading span {
  margin-top: 8px;
  color: rgba(223, 249, 255, 0.58);
  font-size: 0.86rem;
}

.ecrs-calendar-heading > strong {
  color: #67d9ff;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.9;
  text-align: right;
}

.ecrs-calendar-heading > strong small {
  margin-top: 7px;
  color: rgba(223, 249, 255, 0.56);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.search-page.ecrs-calendar-page .ecrs-calendar-panel {
  margin-top: 0;
}

.ecrs-calendar-page .event-calendar-event {
  cursor: default;
}

.ecrs-calendar-page .event-calendar-event:hover {
  transform: none;
}

.ecrs-calendar-page button.event-calendar-event {
  width: 100%;
  min-width: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ecrs-calendar-tooltip {
  position: fixed;
  z-index: 1900;
  display: grid;
  width: max-content;
  max-width: min(320px, calc(100vw - 20px));
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid rgba(103, 217, 255, 0.35);
  border-radius: 10px;
  background: rgba(7, 17, 23, 0.98);
  color: #f4fcff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
  backdrop-filter: blur(16px);
}

.ecrs-calendar-tooltip[hidden] {
  display: none;
}

.ecrs-calendar-tooltip strong {
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ecrs-calendar-tooltip small {
  color: #67d9ff;
  font-size: 0.72rem;
  font-weight: 750;
}

.ecrs-calendar-tooltip-detail {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ecrs-calendar-tooltip-detail[hidden],
.ecrs-calendar-tooltip-agenda[hidden] {
  display: none;
}

.ecrs-calendar-tooltip-detail span,
.ecrs-calendar-tooltip-agenda figcaption {
  color: rgba(223, 249, 255, 0.58);
  font-weight: 650;
}

.ecrs-calendar-tooltip-detail b {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ecrs-calendar-tooltip-agenda {
  display: grid;
  width: min(294px, calc(100vw - 48px));
  gap: 5px;
  margin: 2px 0 0;
  font-size: 0.72rem;
}

.ecrs-calendar-tooltip-agenda img {
  display: block;
  width: 100%;
  max-width: 294px;
  max-height: min(260px, 42vh);
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
}

/* Stable bottom-nav geometry: isolated from the legacy mode-card styles. */
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  box-sizing: border-box;
  appearance: none;
  background: transparent;
  color: rgba(203, 213, 225, 0.58);
  box-shadow: none;
  text-decoration: none;
  transform: none;
  order: initial;
}

.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item:hover,
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item:focus-visible {
  border: 0;
  background: rgba(255, 255, 255, 0.055);
  color: #eefcff;
  box-shadow: none;
  transform: none;
}

.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item.is-active {
  border: 0;
  background: linear-gradient(135deg, rgba(21, 159, 211, 0.24), rgba(21, 159, 211, 0.08));
  color: #67d9ff;
  box-shadow: inset 0 0 0 1px rgba(103, 217, 255, 0.18);
  transform: none;
}

.search-page.ecrs-page .ecrs-bottom-nav-data { grid-column: 1; }
.search-page.ecrs-page .ecrs-bottom-nav-calendar { grid-column: 2; }
.search-page.ecrs-page .ecrs-bottom-nav-face { grid-column: 3; }

@media (max-width: 620px) {
  .search-page.ecrs-calendar-page > .search-shell {
    padding-top: 16px;
  }

  .ecrs-calendar-heading {
    align-items: center;
    padding: 16px;
    border-radius: 12px;
  }

  .ecrs-calendar-heading h1 {
    font-size: 1.7rem;
  }

  .ecrs-calendar-heading > strong {
    font-size: 1.8rem;
  }

  .search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav > .ecrs-bottom-nav-item {
    grid-template-columns: 1fr;
    grid-template-rows: 30px 18px;
    justify-items: center;
    gap: 4px;
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    padding: 6px 3px;
  }
}

/* Bottom navigation must remain dimensionally fixed when tabs change. */
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav {
  grid-template-rows: 54px;
  align-items: center;
  width: min(640px, calc(100vw - 36px));
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  box-sizing: border-box;
  contain: layout;
  transition: none;
}

.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav .ecrs-mode-copy,
.search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav .ecrs-mode-copy strong {
  min-width: 0;
  height: 18px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .search-page.ecrs-page .ecrs-mode-tabs.ecrs-bottom-nav {
    right: 0;
    grid-template-rows: 68px;
    width: 100vw;
    height: calc(83px + env(safe-area-inset-bottom));
    min-height: calc(83px + env(safe-area-inset-bottom));
    max-height: calc(83px + env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   SMART BRAND CI MASTER STYLESHEET (Aligned with MainCI.md)
   ========================================================================== */

/* Typography Rules */
h1, h2, h3, .brand, .hero-kicker, .button.primary, .otp-button, .search-button, .result-mode-tab, .ecrs-mode-tab {
  font-family: var(--font-headline), var(--font-thai), sans-serif;
  letter-spacing: -0.01em;
}

body, p, span, small, label, input, select, textarea, .file-note, .notice {
  font-family: var(--font-thai);
}

/* Backgrounds & Base Layouts */
html, body, .search-page, .otp-page, .events-page, .upload-page, .ecrs-page {
  background: var(--smart-black) !important;
  background-color: var(--smart-black) !important;
  color: var(--smart-white) !important;
}

/* Clean up legacy patterns and gradients */
.search-hero::before,
.ecrs-page .search-hero::before,
.otp-card::before,
.search-hero::after,
.ecrs-page .search-hero::after {
  display: none !important;
}

/* Hero Section (Seamless Dark) */
.search-hero, .events-hero, .upload-hero {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  padding: 2.5rem 1rem 2rem !important;
}

.search-hero .hero-logo, .events-hero .hero-logo, .upload-hero .hero-logo, .otp-logo {
  display: block;
  width: min(150px, 46vw);
  max-height: 80px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
}

.search-hero h2, .events-hero h2, .upload-hero h2 {
  color: var(--smart-white) !important;
  font-family: var(--font-headline) !important;
  font-weight: 700 !important;
  font-size: clamp(26px, 4vw, 36px) !important;
}

.search-hero p, .events-hero p, .upload-hero p {
  color: var(--smart-silver) !important;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-pills span {
  background: rgba(215, 230, 0, 0.12) !important;
  color: var(--smart-lime) !important;
  border: 1px solid rgba(215, 230, 0, 0.35) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
}

/* Headings in Panels (Fix cyan colors) */
.panel-heading h2,
.results-heading h2,
.search-page .panel-heading h2,
.search-page:not(.profiles-page) .search-uploader .panel-heading h2,
.ecrs-page .search-uploader .panel-heading h2,
.search-page.ecrs-page .search-uploader .panel-heading h2 {
  color: var(--smart-white) !important;
  font-family: var(--font-headline) !important;
  font-weight: 700 !important;
}

.panel-heading p, .results-heading p, .file-note {
  color: var(--smart-silver) !important;
}

/* Panels, Cards, Dropzones */
.panel, .search-uploader, .results-panel, .otp-card, .event-form-panel, .event-list li, .gallery-item {
  background: #1c1c1b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 24px !important;
  color: var(--smart-white) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35) !important;
}

.dropzone {
  border: 2px dashed rgba(215, 230, 0, 0.4) !important;
  border-radius: 18px !important;
  background: rgba(215, 230, 0, 0.03) !important;
}

.dropzone:hover {
  border-color: var(--smart-lime) !important;
  background: rgba(215, 230, 0, 0.08) !important;
}

.dropzone-icon {
  color: var(--smart-lime) !important;
}

/* Inputs & Form Controls */
input[type="text"], input[type="tel"], select, textarea {
  background: #242423 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
}

input[type="text"]:focus, input[type="tel"]:focus, select:focus, textarea:focus {
  border-color: var(--smart-lime) !important;
  box-shadow: 0 0 0 3px rgba(215, 230, 0, 0.22) !important;
}

/* Primary Action Buttons (Pill Rounded, Lime Background, Black Text) */
.button.primary, .search-button, .otp-button, .guest-submit, .save-button,
button[type="submit"].button.primary, a.button.primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 50px !important;
  padding: 0.65rem 1.6rem !important;
  background: var(--smart-lime) !important;
  color: var(--smart-black) !important;
  border: 2px solid #ffffff !important;
  border-radius: 999px !important;
  font-family: var(--font-headline) !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
}

.button.primary:hover, .search-button:hover, .otp-button:hover {
  opacity: 0.92 !important;
  transform: translateY(-1px) !important;
  background: var(--smart-lime) !important;
  color: var(--smart-black) !important;
}

.button.primary:disabled, .search-button:disabled, .otp-button:disabled {
  opacity: 0.4 !important;
  filter: grayscale(1) !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Secondary / Navigation Buttons */
.nav a, .button:not(.primary), .btn-ghost {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: #242423 !important;
  color: var(--smart-white) !important;
  transition: all 0.15s ease !important;
}

.nav a:hover, .button:not(.primary):hover {
  border-color: var(--smart-lime) !important;
  color: var(--smart-lime) !important;
  background: rgba(215, 230, 0, 0.08) !important;
}

/* Source Selection Buttons */
.source-button {
  background: #242423 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 16px !important;
  color: var(--smart-white) !important;
  transition: all 0.18s ease !important;
}

.source-button:hover, .source-button.is-active {
  border-color: var(--smart-lime) !important;
  background: rgba(215, 230, 0, 0.08) !important;
}

.source-icon {
  background: #141413 !important;
  color: var(--smart-lime) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

/* Result Mode Tabs */
.result-mode-tab, .ecrs-mode-tab {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: #242423 !important;
  color: var(--smart-silver) !important;
  font-family: var(--font-headline) !important;
  font-weight: 600 !important;
}

.result-mode-tab.is-active, .ecrs-mode-tab.is-active {
  background: var(--smart-lime) !important;
  color: var(--smart-black) !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
}

/* Badges and Secondary Accents */
.badge, .event-list-id, .selfie-ready-mark {
  background: rgba(215, 230, 0, 0.15) !important;
  color: var(--smart-lime) !important;
  border: 1px solid rgba(215, 230, 0, 0.3) !important;
  border-radius: 999px !important;
}

.notice.success {
  background: rgba(172, 230, 183, 0.15) !important;
  border-color: var(--smart-light-green) !important;
  color: var(--smart-light-green) !important;
  border-radius: 14px !important;
}

.notice.error, .otp-alert {
  background: rgba(234, 156, 152, 0.15) !important;
  border-color: var(--smart-light-red) !important;
  color: var(--smart-light-red) !important;
  border-radius: 14px !important;
}

