:root {
  --pcm-bg: #ffffff;
  --pcm-surface: #ffffff;
  --pcm-surface-muted: #f6f8fb;
  --pcm-text: #172033;
  --pcm-text-dark: #172033;
  --pcm-text-muted: #5a667d;
  --pcm-border: #d7dee8;
  --pcm-primary: #0f766e;
  --pcm-primary-strong: #0c5e58;
  --pcm-secondary: #ffffff;
  --pcm-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --pcm-shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.08);
  --pcm-glow: rgba(15, 118, 110, 0.08);
}

#pcm-banner,
#pcm-modal,
#pcm-reopen-shell,
#pcm-reopen {
  box-sizing: border-box;
}

#pcm-banner *,
#pcm-modal *,
#pcm-reopen-shell *,
#pcm-reopen * {
  box-sizing: inherit;
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
}

#pcm-banner,
#pcm-modal,
#pcm-reopen {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.4;
}

#pcm-banner h1,
#pcm-banner h2,
#pcm-banner h3,
#pcm-banner h4,
#pcm-banner h5,
#pcm-banner h6,
#pcm-banner p,
#pcm-modal h1,
#pcm-modal h2,
#pcm-modal h3,
#pcm-modal h4,
#pcm-modal h5,
#pcm-modal h6,
#pcm-modal p {
  margin: 0;
  padding: 0;
  border: 0;
}

#pcm-banner button,
#pcm-modal button,
#pcm-reopen-shell button {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  background-image: none;
  box-shadow: none;
}

#pcm-banner .pcm-title,
#pcm-modal .pcm-title,
#pcm-modal .pcm-option h3 {
  font-family: "Segoe UI", Arial, sans-serif;
}

.pcm-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 99998;
  color: var(--pcm-text-dark);
}

.pcm-banner__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 1120px;
  margin: 0 auto;
  gap: 24px;
  align-items: center;
  padding: 20px 22px;
  background:
    radial-gradient(circle at top right, var(--pcm-glow), transparent 34%),
    linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 1px solid var(--pcm-border);
  border-radius: 22px;
  box-shadow: var(--pcm-shadow-soft);
}

.pcm-title {
  margin: 0 0 8px;
  color: var(--pcm-text-dark);
  font-size: 1.28rem;
  line-height: 1.25;
  font-weight: 700;
}

.pcm-banner__text p,
.pcm-modal__header p,
.pcm-option__copy p {
  margin: 0;
  line-height: 1.55;
}

.pcm-banner__text {
  max-width: 760px;
}

.pcm-banner__text p,
.pcm-modal__header p {
  color: var(--pcm-text-muted);
}

.pcm-modal__header p,
.pcm-option__copy p {
  color: var(--pcm-text-muted);
}

.pcm-banner__actions,
.pcm-modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pcm-banner__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  align-items: stretch;
}

.pcm-button,
.pcm-icon-button,
.pcm-footer-link {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pcm-button {
  padding: 12px 18px;
  min-width: 132px;
  min-height: 50px;
  font-weight: 600;
}

.pcm-button--primary {
  background: #e7f6f4 !important;
  color: #0c5e58 !important;
  border-color: rgba(15, 118, 110, 0.24) !important;
  box-shadow: none !important;
}

.pcm-button--primary:hover,
.pcm-button--primary:focus-visible {
  background: #d8f0ec !important;
  transform: translateY(-1px);
}

.pcm-button--secondary {
  background: #ffffff !important;
  color: var(--pcm-text-dark) !important;
  border-color: var(--pcm-border) !important;
}

.pcm-button--ghost {
  background: #ffffff !important;
  color: var(--pcm-text-dark) !important;
  border-color: var(--pcm-border) !important;
}

.pcm-button--ghost:hover,
.pcm-button--secondary:hover,
.pcm-button--ghost:focus-visible,
.pcm-button--secondary:focus-visible {
  transform: translateY(-1px);
}

.pcm-button--primary:hover,
.pcm-button--secondary:hover,
.pcm-button--ghost:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pcm-icon-button {
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
  background: transparent;
  color: var(--pcm-text-dark);
}

.pcm-button:focus-visible,
.pcm-icon-button:focus-visible,
.pcm-switch input:focus-visible + .pcm-switch__slider,
.pcm-footer-link:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

.pcm-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.pcm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.pcm-modal__dialog {
  position: relative;
  width: min(720px, calc(100% - 32px));
  margin: 5vh auto;
  background: var(--pcm-surface);
  color: var(--pcm-text-dark);
  border-radius: 28px;
  box-shadow: var(--pcm-shadow);
  padding: 28px;
  overflow: hidden;
}

.pcm-modal__dialog::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #d9f3ef, #0f766e);
}

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

.pcm-options {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.pcm-option {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  background: var(--pcm-surface-muted);
  border: 1px solid var(--pcm-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.pcm-option h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.pcm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pcm-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pcm-switch__slider {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: #94a3b8;
}

.pcm-switch__slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.pcm-switch input:checked + .pcm-switch__slider {
  background: var(--pcm-primary);
}

.pcm-switch input:checked + .pcm-switch__slider::after {
  transform: translateX(24px);
}

.pcm-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.9rem;
  font-weight: 600;
}

.pcm-footer-link-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px auto 8px;
  padding: 0 16px 20px;
}

.pcm-footer-link {
  padding: 0;
  background: transparent;
  color: var(--pcm-text-muted);
  border: 0;
  border-bottom: 1px solid rgba(82, 96, 122, 0.35);
  border-radius: 0;
  box-shadow: none;
}

.pcm-footer-link:hover,
.pcm-footer-link:focus-visible {
  color: var(--pcm-text-dark);
  border-bottom-color: rgba(23, 32, 51, 0.55);
}

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

@media (max-width: 782px) {
  .pcm-banner {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .pcm-banner__content {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .pcm-title {
    margin-bottom: 6px;
    font-size: 1.02rem;
  }

  .pcm-banner__text p {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .pcm-banner__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .pcm-button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: center;
    justify-content: center;
  }

  .pcm-modal__dialog {
    width: calc(100% - 16px);
    margin: 8px auto;
    max-height: calc(100vh - 16px);
    border-radius: 20px;
    padding: 20px 16px 16px;
    overflow: auto;
  }

  .pcm-modal__header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pcm-modal__header p {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .pcm-options {
    gap: 10px;
    margin: 18px 0;
  }

  .pcm-option {
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    flex-direction: row;
    align-items: center;
  }

  .pcm-option h3 {
    margin-bottom: 4px;
    font-size: 0.96rem;
  }

  .pcm-option__copy p {
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .pcm-switch__slider {
    width: 48px;
    height: 28px;
  }

  .pcm-switch__slider::after {
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
  }

  .pcm-switch input:checked + .pcm-switch__slider::after {
    transform: translateX(20px);
  }

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

  .pcm-footer-link-shell {
    margin-top: 14px;
    padding: 0 12px 10px;
  }
}

@media (max-width: 520px) {
  .pcm-banner__content {
    padding: 14px;
  }

  .pcm-banner__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pcm-banner__actions .pcm-button--primary {
    grid-column: 1 / -1;
  }

  .pcm-title {
    font-size: 0.96rem;
  }

  .pcm-banner__text p,
  .pcm-modal__header p,
  .pcm-option__copy p {
    font-size: 0.86rem;
  }

  .pcm-button {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 0.88rem;
  }

  .pcm-modal__dialog {
    width: calc(100% - 10px);
    margin: 5px auto;
    max-height: calc(100vh - 10px);
    padding: 18px 14px 14px;
  }

  .pcm-option {
    padding: 12px;
  }

  .pcm-modal__actions {
    grid-template-columns: 1fr;
  }
}
