.tscs-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(60vw 60vw at 15% 15%, rgba(47, 107, 79, 0.16), transparent 60%),
    radial-gradient(50vw 50vw at 85% 0%, rgba(17, 24, 39, 0.18), transparent 58%),
    rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(6px) saturate(110%);
}

.tscs-modal {
  width: min(980px, 100%);
  position: relative;
  border-radius: max(var(--radius-lg, 14px), var(--tscs-radius, 16px));
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff);
  color: var(--text, var(--tscs-text, #1f2933));
  box-shadow: var(--shadow-md, 0 14px 34px rgba(17, 24, 39, 0.1));
  overflow: hidden;
  animation: tscs-enter 0.28s cubic-bezier(0.19, 1, 0.22, 1);
}

.tscs-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(320px, 1fr);
}

.tscs-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  color: #111;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.12);
}

.tscs-hero {
  position: relative;
  padding: 28px;
  background:
    linear-gradient(150deg, rgba(17, 17, 17, 0.95), rgba(17, 17, 17, 0.86) 60%, rgba(47, 107, 79, 0.94));
  color: #fff;
  overflow: hidden;
}

.tscs-hero::before,
.tscs-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.tscs-hero::before {
  width: 260px;
  height: 260px;
  right: -90px;
  top: -120px;
  background: rgba(255, 255, 255, 0.08);
}

.tscs-hero::after {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: -80px;
  background: rgba(255, 255, 255, 0.07);
}

.tscs-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.tscs-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 10px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tscs-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tscs-logo-fallback {
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.tscs-brand-name {
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.tscs-brand-sub {
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 12px;
  opacity: 0.86;
  letter-spacing: 0.01em;
}

.tscs-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 5px 10px;
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tscs-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7fe4ac;
  box-shadow: 0 0 0 6px rgba(127, 228, 172, 0.2);
}

.tscs-hero h2 {
  position: relative;
  z-index: 1;
  margin: 14px 0 10px;
  color: #fff;
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.04;
  letter-spacing: 0.005em;
}

.tscs-description {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.tscs-pills {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tscs-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tscs-pill-accent {
  background: rgba(127, 228, 172, 0.16);
  border-color: rgba(127, 228, 172, 0.34);
}

.tscs-links {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tscs-links a {
  color: rgba(255, 255, 255, 0.92);
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tscs-controls {
  background: var(--surface, #fff);
  padding: 24px;
}

.tscs-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tscs-btn {
  appearance: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm, 8px);
  min-height: 46px;
  padding: 10px 14px;
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tscs-btn:hover {
  transform: translateY(-1px);
}

.tscs-btn-primary {
  background: var(--brand, var(--tscs-primary, #111111));
  border-color: var(--brand, var(--tscs-primary, #111111));
  color: #fff;
}

.tscs-btn-primary:hover {
  background: var(--brand-dark, #000000);
  border-color: var(--brand-dark, #000000);
}

.tscs-btn-secondary {
  background: #fff;
  border-color: var(--btn-secondary-border, var(--brand, #111111));
  color: var(--btn-secondary-text, var(--brand, #111111));
}

.tscs-btn-secondary:hover {
  background: #f6f7f8;
  border-color: #000;
}

.tscs-btn-ghost {
  background: var(--surface-soft, #f7f7f8);
  border-color: var(--border, #e5e7eb);
  color: var(--text, #1f2933);
}

.tscs-btn-ghost:hover {
  background: #eef0f2;
}

.tscs-preferences {
  margin-top: 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  background: linear-gradient(180deg, #ffffff, var(--surface-soft, #f7f7f8));
  padding: 14px;
}

.tscs-preferences[hidden] {
  display: none !important;
}

.tscs-preferences h3 {
  margin: 0;
  color: var(--heading, #111111);
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.1;
}

.tscs-preferences p {
  margin: 8px 0 0;
  color: var(--text-muted, #6b7280);
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.tscs-toggle-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.tscs-toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  background: #fff;
  padding: 11px 12px;
}

.tscs-toggle-text {
  display: grid;
  gap: 3px;
}

.tscs-toggle-label {
  color: var(--heading, #111111);
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
}

.tscs-toggle-description {
  color: var(--text-muted, #6b7280);
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

.tscs-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tscs-toggle-ui {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s ease;
}

.tscs-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.tscs-toggle-ui.is-on {
  background: var(--accent, #2f6b4f);
}

.tscs-toggle-ui.is-on::after {
  transform: translateX(20px);
}

.tscs-preferences-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.tscs-btn-save {
  min-width: 180px;
}

.tscs-revisit {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99997;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(140deg, #111111, #23272f);
  color: #fff;
  min-height: 42px;
  padding: 10px 14px;
  font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.3);
}

.tscs-revisit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.34);
}

@keyframes tscs-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .tscs-shell {
    grid-template-columns: 1fr;
  }

  .tscs-hero,
  .tscs-controls {
    padding: 18px;
  }

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

  .tscs-btn {
    width: 100%;
  }

  .tscs-preferences-actions {
    justify-content: stretch;
  }

  .tscs-btn-save {
    width: 100%;
    min-width: 0;
  }

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

  .tscs-revisit {
    left: 10px;
    right: 10px;
    bottom: 10px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tscs-modal,
  .tscs-btn,
  .tscs-revisit,
  .tscs-toggle-ui,
  .tscs-toggle-ui::after {
    animation: none !important;
    transition: none !important;
  }
}
