.cnaigc-save-entry {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 10px;
  margin: 2px 0;
  min-height: 42px;
  padding: 9px 12px;
  text-align: left;
  width: 100%;
}

.cnaigc-save-entry:hover {
  background: rgba(127, 127, 127, 0.12);
}

@media (min-width: 769px) and (hover: hover) {
  .cnaigc-save-entry[data-save-site-action="refresh"]:hover {
    background: #111827;
    color: #ffffff;
  }
}

#menuPanel > .cnaigc-save-entry {
  color: #1e293b;
  font-size: 13px;
  font-weight: 500;
  gap: 8px;
  min-height: 40px;
  padding: 10px 12px;
}

#menuPanel > .cnaigc-save-entry .cnaigc-save-entry-icon {
  font-size: 16px;
  width: 16px;
}

.cnaigc-save-entry-icon {
  display: inline-grid;
  font-size: 20px;
  line-height: 1;
  place-items: center;
  width: 22px;
}

.cnaigc-save-entry-fallback {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  bottom: 76px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  color: #111827;
  left: 18px;
  position: fixed;
  width: auto;
  z-index: 9997;
}

.cnaigc-save-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10000;
}

.cnaigc-save-dialog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  color: #111827;
  max-width: 520px;
  padding: 30px;
  position: relative;
  width: 100%;
}

.cnaigc-save-close {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  font-size: 28px;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
}

.cnaigc-save-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.cnaigc-save-brand {
  align-items: center;
  background: #111827;
  border-radius: 12px;
  color: #ffffff;
  display: flex;
  font-size: 22px;
  font-weight: 750;
  height: 44px;
  justify-content: center;
  margin-bottom: 18px;
  width: 44px;
}

.cnaigc-save-dialog h2 {
  color: #111827;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 44px 6px 0;
}

.cnaigc-save-dialog > p {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 24px;
}

.cnaigc-save-bookmark-row {
  align-items: center;
  background: #f7f7f8;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 64px;
  padding: 13px 16px;
}

.cnaigc-save-bookmark-row > span {
  color: #374151;
  font-size: 15px;
  font-weight: 600;
}

.cnaigc-save-shortcut {
  color: #000000;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.cnaigc-save-install-area {
  margin-bottom: 8px;
}

.cnaigc-save-primary {
  appearance: none;
  background: #111827;
  border: 1px solid #111827;
  border-radius: 11px;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  min-height: 48px;
  padding: 12px 18px;
  width: 100%;
}

.cnaigc-save-primary:hover {
  background: #000000;
}

.cnaigc-save-manual {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 15px 16px;
}

.cnaigc-save-manual strong {
  color: #111827;
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.cnaigc-save-manual .cnaigc-save-primary {
  margin-top: 4px;
}

.cnaigc-save-steps-panel[hidden] {
  display: none;
}

.cnaigc-save-steps-panel {
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  margin-top: 12px;
  outline: none;
  padding: 12px 14px;
}

.cnaigc-save-steps-panel.is-expanded {
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.cnaigc-save-steps-panel > strong {
  color: #065f46;
  font-size: 14px;
  margin-bottom: 5px;
}

.cnaigc-save-steps {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  padding-left: 22px;
}

.cnaigc-save-dismiss {
  appearance: none;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  display: block;
  font-size: 13px;
  margin: 14px auto -4px;
  padding: 6px 10px;
}

.cnaigc-save-dismiss:hover {
  color: #111827;
  text-decoration: underline;
}

.cnaigc-save-nudge {
  appearance: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  bottom: 28px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
  color: #111827;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 280px;
  padding: 14px 16px;
  position: fixed;
  right: 28px;
  text-align: left;
  z-index: 9998;
}

.cnaigc-save-nudge strong {
  font-size: 14px;
}

.cnaigc-save-nudge span {
  color: #6b7280;
  font-size: 13px;
}

@media (max-width: 768px) {
  .cnaigc-save-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .cnaigc-save-dialog {
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92vh;
    max-width: none;
    overflow-y: auto;
    padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
  }

  .cnaigc-save-dialog h2 {
    font-size: 21px;
  }

  .cnaigc-save-bookmark-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .cnaigc-save-shortcut {
    font-size: 20px;
    text-align: left;
    white-space: normal;
  }

  .cnaigc-save-nudge {
    bottom: calc(18px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
    right: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cnaigc-save-dialog {
    animation: cnaigc-save-enter 160ms ease-out;
  }

  @keyframes cnaigc-save-enter {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}
