.sc-cm-root,
.sc-cm-root * {
  box-sizing: border-box;
}

.sc-cm-root {
  position: fixed;
  inset-inline: 12px;
  bottom: 12px;
  z-index: 10000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  font-family: inherit;
  color: #1f2937;
}

.sc-cm-banner {
  pointer-events: auto;
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .18);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: sc-cm-rise .28s ease both;
}

@keyframes sc-cm-rise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sc-cm-banner h2 {
  margin: 0;
  font-size: 1.05rem;
}

.sc-cm-banner p {
  margin: 0;
  color: #6b7280;
  font-size: .92rem;
  line-height: 1.55;
}

.sc-cm-banner a {
  color: #2563eb;
  text-decoration: underline;
}

.sc-cm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sc-cm-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.8px solid transparent;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease, border-color .2s ease;
}

.sc-cm-btn:active { transform: scale(.98); }

.sc-cm-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.sc-cm-btn--primary {
  background: #2563eb;
  color: #fff;
}

.sc-cm-btn--primary:hover { background: #1d4ed8; }

.sc-cm-btn--secondary {
  background: #fff;
  color: #1f2937;
  border-color: #cbd5e1;
}

.sc-cm-btn--secondary:hover { border-color: #2563eb; }

.sc-cm-btn--ghost {
  background: none;
  color: #2563eb;
  border-color: transparent;
  flex: 0 0 auto;
  min-width: 0;
}

.sc-cm-btn--ghost:hover { text-decoration: underline; }

.sc-cm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: sc-cm-fade .2s ease both;
}

@keyframes sc-cm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sc-cm-dialog {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .18);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: sc-cm-pop .22s ease both;
}

@keyframes sc-cm-pop {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.sc-cm-dialog h2 {
  margin: 0;
  font-size: 1.15rem;
}

.sc-cm-dialog > p {
  margin: 0;
  color: #6b7280;
  font-size: .9rem;
  line-height: 1.55;
}

.sc-cm-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1.8px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s ease;
}

.sc-cm-opt:hover { border-color: #cbd5e1; }

.sc-cm-opt input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  flex: none;
  cursor: pointer;
  accent-color: #2563eb;
}

.sc-cm-opt span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-cm-opt strong {
  font-size: .95rem;
}

.sc-cm-opt small {
  color: #6b7280;
  font-size: .85rem;
  line-height: 1.45;
}

.sc-cm-note {
  color: #6b7280;
  font-size: .85rem;
  line-height: 1.5;
}

.sc-cm-note a {
  color: #2563eb;
  text-decoration: underline;
}

.sc-cm-settings {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #2563eb;
  cursor: pointer;
}

.sc-cm-settings:hover { text-decoration: underline; }

footer .sc-cm-settings,
#footerRight .sc-cm-settings,
#lang-switcher .sc-cm-settings {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .sc-cm-banner,
  .sc-cm-overlay,
  .sc-cm-dialog {
    animation: none;
  }
}

@media (max-width: 480px) {
  .sc-cm-banner { padding: 16px; }
  .sc-cm-actions { flex-direction: column; }
  .sc-cm-btn { width: 100%; }
}