:root {
  color-scheme: dark;
  --bg-a: #0b1020;
  --bg-b: #0c2a28;
  --card: rgba(17, 24, 39, 0.78);
  --card-strong: rgba(248, 250, 252, 0.96);
  --text: #f8fafc;
  --text-dark: #102033;
  --muted: #9aa8ba;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6ea8fe;
  --accent-2: #21c7a8;
  --danger: #f87171;
  --warning: #fbbf24;
  --ok: #34d399;
  --glass-edge: rgba(148, 163, 184, 0.2);
  --shadow-deep: 0 26px 70px rgba(2, 8, 23, 0.28), 0 8px 22px rgba(2, 8, 23, 0.16);
  --shadow-soft: 0 18px 44px rgba(2, 8, 23, 0.16), 0 4px 16px rgba(2, 8, 23, 0.08);
  --surface-edge: rgba(255, 255, 255, 0.74);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

body.light {
  color-scheme: light;
  --bg-a: #e9f0ff;
  --bg-b: #d8f4ec;
  --card: rgba(255, 255, 255, 0.78);
  --text: #102033;
  --muted: #5b6778;
  --line: rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.16), transparent 30%),
    radial-gradient(circle at 12% 36%, rgba(59, 130, 246, 0.08), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(20, 184, 166, 0.1), transparent 30%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 15%, black, transparent 68%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 12%, transparent 0 34%, rgba(0, 0, 0, 0.24) 100%);
  mix-blend-mode: multiply;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.hero-panel {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 12px;
}

.masthead {
  text-align: center;
  margin: 8px 0 14px;
}

.app-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(15, 23, 42, 0.56));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -14px 24px rgba(2, 8, 23, 0.22);
  font-size: 28px;
  transform: translateZ(0);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.masthead p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.42;
  font-size: 15px;
}

.search-card {
  width: min(580px, 100%);
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(145deg, rgba(17, 24, 39, 0.86), rgba(9, 15, 28, 0.93));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(2, 8, 23, 0.48);
  transform: perspective(900px) translateZ(0);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input[type="email"] {
  min-width: 0;
  height: 56px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 8px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.94));
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), inset 0 -10px 18px rgba(15, 23, 42, 0.035), 0 10px 26px rgba(2, 8, 23, 0.18);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: rgba(110, 168, 254, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 0 0 5px rgba(110, 168, 254, 0.12), 0 14px 34px rgba(2, 8, 23, 0.2);
}

.primary-button,
.switch-button {
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, #3b6cff 0%, #1ea7dd 46%, #0fb79f 100%);
  box-shadow: 0 18px 34px rgba(15, 174, 155, 0.24), 0 8px 18px rgba(56, 103, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -10px 18px rgba(0, 0, 0, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button {
  min-width: 150px;
  height: 56px;
}

.primary-button:disabled,
.switch-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary-button:not(:disabled):hover,
.switch-button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: saturate(1.08) brightness(1.03);
  box-shadow: 0 22px 44px rgba(15, 174, 155, 0.28), 0 10px 22px rgba(56, 103, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.primary-button:not(:disabled):active,
.switch-button:not(:disabled):active {
  transform: translateY(0);
}

.sample-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.helper-text,
.empty-state,
.muted,
.inline-change {
  color: var(--muted);
  font-size: 14px;
}

.helper-text {
  margin: 8px 0 0;
}

.result-shell {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  animation: resultFadeIn 220ms ease-out;
}

@keyframes resultFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-shell {
  width: min(620px, 100%);
  margin: 0 auto 16px;
  padding: 20px 22px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 250, 250, 0.98), rgba(254, 226, 226, 0.92));
  color: #7f1d1d;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.error-shell strong {
  display: block;
  margin-bottom: 6px;
  color: #991b1b;
  font-size: 18px;
}

.error-shell p {
  margin: 0;
  color: #7f1d1d;
  line-height: 1.55;
}

.buy-whatsapp-button {
  display: block;
  width: min(280px, 100%);
  min-height: 46px;
  margin: 18px auto 0;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
  background: linear-gradient(135deg, #111827, #2563eb 52%, #0f766e);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.buy-whatsapp-button:hover {
  filter: brightness(1.04);
}

.loading-shell {
  display: grid;
  gap: 14px;
  width: 100%;
  margin: 0 auto;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.loading-card {
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.52);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.loading-summary {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.skeleton-line,
.skeleton-pill,
.skeleton-bar {
  display: block;
  position: relative;
  overflow: hidden;
  background: #dbe4ef;
}

.skeleton-line::after,
.skeleton-pill::after,
.skeleton-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: skeletonShimmer 1.15s ease-in-out infinite;
}

.skeleton-line {
  width: min(220px, 100%);
  height: 18px;
  border-radius: 999px;
  margin-top: 12px;
}

.skeleton-line.short {
  width: 96px;
  height: 12px;
  margin-top: 0;
}

.skeleton-line.title {
  width: 260px;
  height: 28px;
}

.skeleton-pill {
  width: 110px;
  height: 38px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.skeleton-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  margin-top: 22px;
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%);
  }
}

.summary-card,
.panel,
.switch-card {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.84)),
    var(--card-strong);
  color: var(--text-dark);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(148, 163, 184, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.summary-card:hover,
.panel:hover,
.switch-card:hover {
  border-color: rgba(203, 213, 225, 0.98);
  box-shadow: 0 24px 58px rgba(2, 8, 23, 0.18), 0 8px 18px rgba(2, 8, 23, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.summary-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
}

.summary-card h2 {
  margin-bottom: 0;
}

.eyebrow,
.label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.status-pill {
  display: inline-flex;
  min-width: 96px;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: white;
  background: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 12px 26px rgba(2, 8, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.panel {
  padding: 16px 18px;
  min-width: 0;
}

.panel strong {
  font-size: 19px;
  overflow-wrap: anywhere;
}

.inline-change {
  margin: 8px 0 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#profileEmail,
#teamName,
.product-pill {
  max-width: 100%;
}

#profileEmail {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 19px;
  line-height: 1.25;
}

#profileEmail.email-long {
  font-size: 16px;
}

#profileEmail.email-extra-long {
  font-size: 14px;
  line-height: 1.22;
}

#teamName {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.product-pill {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 7px 16px rgba(15, 23, 42, 0.06);
}

.progress-header,
.date-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #dbe4ef, #e9eff7);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3867ff, #21a7df 48%, #0fae9b);
  transition: width 240ms ease;
  box-shadow: 0 0 18px rgba(33, 199, 168, 0.32);
}

.date-row {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
}

.notice-panel {
  border-left: 4px solid var(--danger);
  padding: 18px 20px 20px;
}

.notice-panel .label {
  margin-bottom: 8px;
}

.notice-panel #teamStatus {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: #071a2f;
}

.notice-panel.is-active {
  background: linear-gradient(145deg, rgba(240, 253, 244, 0.98), rgba(236, 253, 245, 0.9));
}

.notice-panel.is-inactive {
  background: linear-gradient(145deg, rgba(255, 247, 247, 0.98), rgba(254, 242, 242, 0.9));
}

.notice-panel.is-active #teamStatus,
.notice-panel.is-active #teamMessage strong {
  color: #047857;
}

.notice-panel.is-inactive #teamStatus,
.notice-panel.is-inactive #teamMessage strong {
  color: #b91c1c;
}

.notice-panel.is-active #teamMessage {
  color: #065f46;
}

.notice-panel.is-inactive #teamMessage {
  color: #7f1d1d;
}

#teamMessage {
  max-width: 1120px;
  margin: 10px 0 0;
  color: #0b1f35;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  overflow-wrap: anywhere;
}

#teamMessage strong {
  color: #071a2f;
  font-size: inherit;
  line-height: inherit;
  font-weight: 750;
}

.instructions-card {
  padding: 20px 22px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-left: 4px solid #38bdf8;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(240, 249, 255, 0.98), rgba(219, 234, 254, 0.9));
  color: #0f3352;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.instructions-card h3 {
  margin: 0 0 10px;
  color: #075985;
  font-size: 18px;
}

.instruction-audio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.instruction-audio-head h3 {
  margin: 0;
}

.audio-ready-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 999px;
  background: rgba(240, 249, 255, 0.82);
  color: #075985;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.instruction-audio {
  display: block;
  width: 100%;
  margin: 0;
}

.instruction-transcript {
  margin-top: 14px;
}

.instruction-transcript summary {
  cursor: pointer;
  color: #075985;
  font-weight: 800;
}

.instructions-card p {
  margin: 0;
  color: #174366;
  line-height: 1.65;
  font-size: 15px;
}

.instructions-card p + p {
  margin-top: 12px;
}

.instructions-card strong {
  color: #082f49;
  font-weight: 800;
}

.switch-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  background: linear-gradient(145deg, #f4f9ff, #d8fff4);
}

.switch-card h3 {
  margin-bottom: 6px;
}

.switch-card p {
  margin-bottom: 0;
  color: #1d4c68;
}

.switch-card-waiting {
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(145deg, #f8fbff, #e0f2fe);
}

.switch-card-waiting h3::before {
  content: "↻ ";
  color: #2563eb;
}

.switch-card-waiting .switch-button {
  background: #94a3b8;
  box-shadow: none;
}

.renewal-card {
  border-left: 4px solid #ef4444;
  border-color: rgba(248, 113, 113, 0.46);
  background: linear-gradient(145deg, #fff7ed, #fee2e2);
}

.renewal-card h3 {
  color: #9a3412;
}

.renewal-card p {
  color: #7c2d12;
}

.renewal-card .switch-button {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 18px 34px rgba(239, 68, 68, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.switch-button {
  min-height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

.error-text {
  color: #b91c1c !important;
  margin-top: 10px !important;
}

.empty-state {
  text-align: center;
  margin-top: 24px;
}

.toast {
  position: fixed;
  right: 92px;
  bottom: 24px;
  max-width: min(420px, calc(100% - 40px));
  padding: 14px 16px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(145deg, #13243a, #0b1828);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.switch-success-notice {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--text-dark);
  background:
    radial-gradient(circle at 50% 32%, rgba(110, 168, 254, 0.12), transparent 34%),
    rgba(2, 8, 17, 0.44);
  backdrop-filter: blur(4px);
}

.switch-success-notice[hidden] {
  display: none;
}

.switch-success-panel {
  position: relative;
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: 16px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96)),
    #f8fafc;
  box-shadow:
    0 28px 80px rgba(2, 8, 23, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
}

.switch-success-copy {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.switch-success-notice.is-visible .switch-success-panel {
  animation: switchSuccessIn 260ms ease forwards;
}

.switch-success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 38px;
  color: white;
  background: linear-gradient(135deg, #3b6cff 0%, #1ea7dd 46%, #0fb79f 100%);
  box-shadow: 0 18px 42px rgba(15, 174, 155, 0.28), 0 0 0 8px rgba(110, 168, 254, 0.12);
}

.switch-success-kicker {
  display: block;
  margin-bottom: 8px;
  color: #0f8f83;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.switch-success-notice strong {
  display: block;
  margin: 0 0 9px;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: normal;
}

.switch-success-notice p {
  margin: 0;
  color: #526276;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: normal;
}

.switch-success-team {
  width: 100%;
  margin: 22px auto 0;
  padding: 16px 18px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(226, 242, 248, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 26px rgba(2, 8, 23, 0.08);
}

.switch-success-team span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.switch-success-team b {
  display: block;
  color: #102033;
  font-size: 28px;
  line-height: 1.16;
  overflow-wrap: break-word;
}

.switch-success-ok {
  width: 100%;
  margin-top: 20px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #3b6cff 0%, #1ea7dd 46%, #0fb79f 100%);
  box-shadow: 0 18px 34px rgba(15, 174, 155, 0.24), 0 8px 18px rgba(56, 103, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -10px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.switch-success-ok:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(15, 174, 155, 0.28), 0 10px 22px rgba(56, 103, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.switch-success-ok:active {
  transform: translateY(0);
}

.switch-success-timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(15, 23, 42, 0.08);
}

.switch-success-timer::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2dd4bf, #34d399);
  transform-origin: left;
}

.switch-success-notice.is-visible .switch-success-timer::before {
  animation: switchSuccessTimer 60s linear forwards;
}

.switch-success-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #526276;
  background: rgba(15, 23, 42, 0.08);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.switch-success-close:hover {
  background: rgba(15, 23, 42, 0.13);
}

body.switch-modal-open {
  overflow: hidden;
}

@keyframes switchSuccessIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes switchSuccessTimer {
  to {
    transform: scaleX(0);
  }
}

.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  background: linear-gradient(145deg, #25d366, #128c7e);
  box-shadow: 0 18px 36px rgba(18, 140, 126, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.whatsapp-fab::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(37, 211, 102, 0.34);
  animation: whatsappPulse 1.8s ease-out infinite;
}

.whatsapp-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 22px 44px rgba(18, 140, 126, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.whatsapp-mark {
  position: relative;
  width: 31px;
  height: 31px;
  fill: currentColor;
}

@keyframes whatsappPulse {
  0% {
    opacity: 0.75;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@media (min-width: 980px) {
  body.has-result .app-shell {
    width: min(1180px, calc(100% - 56px));
    padding-top: 18px;
    padding-bottom: 28px;
  }

  body.has-result .hero-panel {
    min-height: 178px;
    justify-content: flex-end;
    padding: 28px 0 18px;
  }

  body.has-result .masthead {
    margin: 0 0 16px;
  }

  body.has-result h1 {
    font-size: clamp(1.8rem, 2.55vw, 2.28rem);
    line-height: 1.08;
    margin-bottom: 8px;
  }

  body.has-result .masthead p {
    font-size: 13px;
    line-height: 1.42;
  }

  body.has-result .search-card {
    width: min(620px, 100%);
    padding: 12px;
    border-radius: 8px;
  }

  body.has-result input[type="email"],
  body.has-result .primary-button {
    height: 48px;
  }

  body.has-result .result-shell {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
  }

  body.has-result .summary-card,
  body.has-result .grid,
  body.has-result .panel.wide {
    grid-column: 1 / -1;
  }

  body.has-result .summary-card {
    padding: 14px 18px;
  }

  body.has-result .summary-card h2 {
    font-size: 24px;
  }

  body.has-result .grid {
    gap: 10px;
  }

  body.has-result .panel {
    padding: 13px 16px;
  }

  body.has-result .panel strong {
    font-size: 18px;
  }

  body.has-result .wide {
    padding: 14px 18px;
  }

  body.has-result .notice-panel {
    grid-column: 1 / 7;
    min-height: 0;
  }

  body.has-result .result-shell.no-switch-card .notice-panel {
    grid-column: 1 / -1;
  }

  body.has-result .switch-card {
    grid-column: 7 / 13;
    padding: 16px 18px;
  }

  body.has-result .instructions-card {
    grid-column: 1 / -1;
    padding: 14px 18px;
  }

  body.has-result .instruction-audio-head {
    margin-bottom: 10px;
  }
}

@media (max-width: 780px) {
  .hero-panel {
    min-height: 300px;
  }

  .input-row,
  .grid,
  .loading-grid,
  .switch-card {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .summary-card,
  .loading-summary,
  .progress-header,
  .date-row {
    align-items: flex-start;
    flex-direction: column;
  }

  #profileEmail,
  #teamName {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .search-card {
    padding: 18px;
  }

  .whatsapp-fab {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  .toast {
    right: 16px;
    bottom: 84px;
  }

  .switch-success-notice {
    padding: 14px;
    align-items: center;
  }

  .switch-success-panel {
    width: min(360px, calc(100vw - 28px));
    padding: 24px 18px 22px;
    border-radius: 14px;
  }

  .switch-success-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    font-size: 30px;
  }

  .switch-success-notice strong {
    font-size: 25px;
  }

  .switch-success-notice p {
    font-size: 14px;
    line-height: 1.45;
  }

  .switch-success-team {
    margin-top: 18px;
    padding: 14px;
  }

  .switch-success-team b {
    font-size: 22px;
  }

  .switch-success-ok {
    min-height: 48px;
    margin-top: 16px;
    font-size: 16px;
  }

  .switch-success-close {
    top: 10px;
    right: 10px;
  }
}
