.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  display: none;
  justify-content: center;
  pointer-events: none;
  padding: 0 14px 12px;
}

.cookie-consent.is-visible {
  display: flex;
}

.cookie-card {
  width: min(1180px, 100%);
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18), 0 1px 0 rgba(255, 255, 255, 0.86) inset;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

.cookie-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.cookie-title {
  font-family: var(--serif, Georgia, serif);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink, #0f0f0f);
  margin-bottom: 4px;
}

.cookie-text {
  font-size: 12px;
  line-height: 1.55;
  color: var(--mid, #706d69);
  max-width: 760px;
}

.cookie-text a {
  color: var(--ink, #111);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.cookie-options {
  margin-top: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 10px;
  display: none;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cookie-options.is-open {
  display: grid;
}

.cookie-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 54px;
}

.cookie-opt-label {
  font-size: 12px;
  color: var(--ink, #0f0f0f);
}

.cookie-opt-sub {
  display: block;
  font-size: 10px;
  color: var(--mid, #777);
  margin-top: 2px;
}

.cookie-actions {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 10px;
}

.cookie-btn {
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink, #0f0f0f);
  height: 36px;
  padding: 0 14px;
  min-width: 128px;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cookie-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.2);
}

.cookie-btn-primary {
  background: var(--ink, #0f0f0f);
  border-color: var(--ink, #0f0f0f);
  color: #fff;
}

.cookie-btn-primary:hover {
  background: #171717;
  border-color: #171717;
}

.cookie-card.is-customizing .cookie-actions {
  justify-content: flex-end;
}

.cookie-switch {
  width: 16px;
  height: 16px;
  accent-color: #0f0f0f;
  cursor: pointer;
}

#scrollTopBtn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1300;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink, #0f0f0f);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

#scrollTopBtn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .cookie-consent {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 8px 8px;
  }

  .cookie-card {
    border-radius: 14px;
    padding: 12px;
    gap: 10px;
  }

  .cookie-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cookie-title {
    font-size: 17px;
  }

  .cookie-text {
    font-size: 11px;
    line-height: 1.45;
  }

  .cookie-options {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    justify-content: flex-start;
    width: 100%;
    padding-top: 8px;
  }

  .cookie-btn {
    min-width: 0;
  }

  #scrollTopBtn {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
  }
}
