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

.pc-root {
  --pc-accent: #1f2937;
  --pc-ink: #111827;
  --pc-muted: #4b5563;
  --pc-line: #d1d5db;
  --pc-soft: #f3f4f6;
  --pc-surface: #ffffff;
  position: relative;
  z-index: 2147483000;
  color: var(--pc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

.pc-root [hidden] {
  display: none !important;
}

.pc-banner {
  position: fixed;
  z-index: 1;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  margin: 0;
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--pc-ink);
  background: var(--pc-surface);
  border: 1px solid var(--pc-line);
  box-shadow: 0 -10px 36px rgba(17, 24, 39, 0.14);
}

.pc-position-bottom .pc-banner {
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(450px, 620px);
  gap: 28px;
  align-items: center;
  border-width: 1px 0 0;
}

.pc-position-bottom-left .pc-banner,
.pc-position-bottom-right .pc-banner {
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: min(460px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(17, 24, 39, 0.22);
}

.pc-position-bottom-left .pc-banner {
  left: 18px;
}

.pc-position-bottom-right .pc-banner {
  right: 18px;
}

.pc-banner__copy,
.pc-banner__actions {
  min-width: 0;
}

.pc-banner__title,
.pc-modal__title,
.pc-category__title {
  margin: 0;
  padding: 0;
  color: var(--pc-ink);
  font-family: inherit;
  font-style: normal;
  text-transform: none;
}

.pc-banner__title {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.pc-banner__message {
  max-width: 820px;
  margin: 7px 0 0;
  padding: 0;
  color: var(--pc-muted);
  font-size: 14px;
  line-height: 1.55;
}

.pc-link {
  color: var(--pc-ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.pc-link:hover {
  color: var(--pc-accent);
}

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

.pc-position-bottom-left .pc-banner__actions,
.pc-position-bottom-right .pc-banner__actions {
  margin-top: 20px;
}

.pc-button,
.pc-reopen,
.pc-modal__close {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  text-transform: none;
  cursor: pointer;
}

.pc-button {
  display: inline-flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--pc-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  background: var(--pc-surface);
  border: 1px solid #9ca3af;
  border-radius: 8px;
  box-shadow: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.pc-button:hover {
  background: var(--pc-soft);
  border-color: #6b7280;
}

.pc-button:active {
  transform: translateY(1px);
}

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

.pc-button--primary:hover {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

.pc-button:focus,
.pc-reopen:focus,
.pc-modal__close:focus,
.pc-link:focus,
.pc-switch__input:focus + .pc-switch__visual {
  outline: 3px solid var(--pc-accent);
  outline-offset: 3px;
}

.pc-button:focus:not(:focus-visible),
.pc-reopen:focus:not(:focus-visible),
.pc-modal__close:focus:not(:focus-visible),
.pc-link:focus:not(:focus-visible),
.pc-switch__input:focus:not(:focus-visible) + .pc-switch__visual {
  outline: none;
}

.pc-reopen {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  z-index: 1;
  display: inline-flex;
  min-height: 42px;
  max-width: min(300px, calc(100vw - 28px));
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--pc-accent);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.24);
}

.pc-position-bottom-right .pc-reopen {
  right: 14px;
  left: auto;
}

.pc-reopen:hover {
  color: #ffffff;
  background: #111827;
}

.pc-reopen__icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.pc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(17, 24, 39, 0.58);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.pc-modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 26px;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--pc-ink);
  background: var(--pc-surface);
  border: 1px solid var(--pc-line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

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

.pc-modal__title {
  font-size: 24px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pc-modal__close {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0 0 3px;
  color: var(--pc-ink);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  background: var(--pc-soft);
  border: 0;
  border-radius: 999px;
}

.pc-modal__close:hover {
  background: #e5e7eb;
}

.pc-modal__description {
  margin: 10px 0 20px;
  color: var(--pc-muted);
  font-size: 14px;
  line-height: 1.55;
}

.pc-categories {
  display: grid;
  gap: 10px;
}

.pc-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.pc-category__copy {
  min-width: 0;
}

.pc-category__title {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
}

.pc-category__description {
  margin: 4px 0 0;
  padding: 0;
  color: var(--pc-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pc-category__required {
  position: relative;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--pc-soft);
  border-radius: 999px;
}

.pc-category__required .pc-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.pc-switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 30px;
  flex: 0 0 50px;
  cursor: pointer;
}

.pc-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}

.pc-switch__visual {
  position: relative;
  width: 50px;
  height: 30px;
  background: #9ca3af;
  border: 1px solid #6b7280;
  border-radius: 999px;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.pc-switch__visual::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.25);
  transition: transform 150ms ease;
}

.pc-switch__input:checked + .pc-switch__visual {
  background: var(--pc-accent);
  border-color: var(--pc-accent);
}

.pc-switch__input:checked + .pc-switch__visual::after {
  transform: translateX(20px);
}

.pc-modal__save {
  width: 100%;
  margin-top: 20px;
}

.pc-toast {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  max-width: min(390px, calc(100vw - 36px));
  padding: 12px 16px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  background: #111827;
  border-radius: 9px;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.26);
}

body.pc-modal-open {
  overflow: hidden !important;
}

@media (max-width: 960px) {
  .pc-position-bottom .pc-banner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .pc-banner {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .pc-position-bottom-left .pc-banner,
  .pc-position-bottom-right .pc-banner {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    width: auto;
    padding: 18px 16px;
    border-radius: 13px;
  }

  .pc-banner__actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pc-position-bottom-left .pc-banner__actions,
  .pc-position-bottom-right .pc-banner__actions {
    margin-top: 16px;
  }

  .pc-backdrop {
    align-items: end;
    padding: 0;
  }

  .pc-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }

  .pc-modal__title {
    font-size: 21px;
  }

  .pc-category {
    gap: 12px;
    padding: 14px;
  }

  .pc-toast {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-root *,
  .pc-root *::before,
  .pc-root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .pc-banner,
  .pc-modal,
  .pc-button,
  .pc-reopen,
  .pc-category,
  .pc-switch__visual {
    border: 1px solid CanvasText;
  }

  .pc-button--primary,
  .pc-reopen,
  .pc-switch__input:checked + .pc-switch__visual {
    color: HighlightText;
    background: Highlight;
  }
}

@media print {
  .pc-root {
    display: none !important;
  }
}
