:root {
  --dc-accent: #1d1d1f;
  --dc-accent-fg: #fff;
  --dc-bg: #fff;
  --dc-fg: #1d1d1f;
  --dc-muted: #5b6168;
  --dc-border: rgba(0, 0, 0, .09);
  --dc-icon: #b8742a;
  --dc-radius: 18px;
  --dc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dc-banner, .dc-modal, .dc-fab, .dc-banner *, .dc-modal *, .dc-fab * {
  box-sizing: border-box;
}

.dc-banner[hidden], .dc-modal[hidden], .dc-fab[hidden] {
  display: none !important;
}

.dc-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 2147483000;
  width: 440px;
  max-width: calc(100vw - 40px);
  padding: 22px;
  background: var(--dc-bg);
  color: var(--dc-fg);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .05);
  font: 400 14px/1.55 var(--dc-font);
  text-align: left;
  animation: dc-in .35s cubic-bezier(.2, .8, .2, 1);
}

@keyframes dc-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.dc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font: 600 16px/1.3 var(--dc-font);
  color: var(--dc-fg);
}

.dc-head svg {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--dc-icon);
}

.dc-body {
  margin: 0 0 18px;
  padding: 0;
  font: 400 14px/1.55 var(--dc-font);
  color: var(--dc-muted);
}

.dc-body strong {
  color: var(--dc-fg);
  font-weight: 600;
}

.dc-body a {
  color: var(--dc-fg);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dc-banner .dc-btn, .dc-modal .dc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--dc-accent);
  border-radius: 12px;
  background: var(--dc-accent);
  color: var(--dc-accent-fg);
  font: 600 14px/1.2 var(--dc-font);
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}

.dc-banner .dc-btn:hover, .dc-modal .dc-btn:hover {
  opacity: .88;
}

.dc-banner .dc-btn:active, .dc-modal .dc-btn:active {
  transform: scale(.98);
}

.dc-modal .dc-btn-ghost {
  background: transparent;
  color: var(--dc-fg);
  border-color: var(--dc-border);
}

.dc-banner .dc-link {
  appearance: none;
  display: block;
  margin: 12px auto 0;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--dc-muted);
  font: 500 13px/1.2 var(--dc-font);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.dc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 12, 16, .5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  font: 400 14px/1.55 var(--dc-font);
  animation: dc-fade .2s ease-out;
}

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

.dc-dialog {
  width: 540px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  background: var(--dc-bg);
  color: var(--dc-fg);
  border-radius: var(--dc-radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .4);
  text-align: left;
}

.dc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dc-modal .dc-x {
  appearance: none;
  flex: none;
  width: 36px;
  height: 36px;
  margin: -6px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dc-muted);
  font: 400 26px/1 var(--dc-font);
  box-shadow: none;
  cursor: pointer;
}

.dc-modal .dc-x:hover {
  background: rgba(0, 0, 0, .05);
}

.dc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--dc-border);
  cursor: pointer;
}

.dc-txt strong {
  display: block;
  margin: 0 0 2px;
  font: 600 14px/1.3 var(--dc-font);
  color: var(--dc-fg);
}

.dc-txt span {
  display: block;
  font: 400 13px/1.45 var(--dc-font);
  color: var(--dc-muted);
}

.dc-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
}

.dc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.dc-slider {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: #d3d7dc;
  transition: background .2s;
}

.dc-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s;
}

.dc-switch input:checked + .dc-slider {
  background: var(--dc-accent);
}

.dc-switch input:checked + .dc-slider::before {
  transform: translateX(20px);
}

.dc-switch input:disabled {
  cursor: not-allowed;
}

.dc-switch input:disabled + .dc-slider {
  opacity: .5;
}

.dc-switch input:focus-visible + .dc-slider {
  outline: 2px solid var(--dc-accent);
  outline-offset: 2px;
}

.dc-actions-3 {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.dc-fab {
  appearance: none;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147482999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--dc-border);
  border-radius: 50%;
  background: var(--dc-bg);
  color: var(--dc-icon);
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: transform .15s;
}

.dc-fab:hover {
  transform: scale(1.06);
}

.dc-fab svg {
  width: 24px;
  height: 24px;
}

html.dc-lock, html.dc-lock body {
  overflow: hidden;
}

@media (max-width: 600px) {
  .dc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    padding: 18px;
  }
  .dc-actions-3 {
    grid-template-columns: 1fr;
  }
  .dc-modal {
    align-items: flex-end;
    padding: 0;
  }
  .dc-dialog {
    max-height: 90vh;
    border-radius: var(--dc-radius) var(--dc-radius) 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  }
  .dc-fab {
    left: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-banner, .dc-modal {
    animation: none;
  }
}
