#kizu-feedback-button {
  position: fixed;
  z-index: 2147483004;
  right: 18px;
  bottom: 18px;
  padding: 0.75rem 1.15rem;
  border: 1px solid #a97c45;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 20px rgb(0 0 0 / 22%);
  color: #173f39;
  cursor: pointer;
  font: 700 0.9rem/1.2 sans-serif;
}

#kizu-feedback-button:hover,
#kizu-feedback-button.is-active {
  background: #255b52;
  color: #fff;
}

#kizu-feedback-overlay {
  position: fixed;
  z-index: 2147483000;
  display: none;
  inset: 0;
  cursor: crosshair;
  background: rgb(23 63 57 / 9%);
}

#kizu-feedback-overlay.is-visible,
#kizu-feedback-hint.is-visible,
#kizu-feedback-highlight.is-visible,
#kizu-feedback-panel.is-visible,
#kizu-feedback-toast.is-visible {
  display: block;
}

#kizu-feedback-hint {
  position: fixed;
  z-index: 2147483003;
  top: 12px;
  left: 50%;
  display: none;
  max-width: calc(100vw - 24px);
  padding: 0.55rem 1rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #173f39;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}

#kizu-feedback-highlight {
  position: fixed;
  z-index: 2147483001;
  display: none;
  border: 3px solid #a97c45;
  border-radius: 6px;
  background: rgb(169 124 69 / 12%);
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}

#kizu-feedback-panel {
  position: fixed;
  z-index: 2147483005;
  bottom: 18px;
  left: 50%;
  display: none;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 36px);
  padding: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-50%);
  border: 1px solid #e8dfcf;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgb(0 0 0 / 32%);
  color: #24302e;
  font-family: sans-serif;
}

#kizu-feedback-panel h2 {
  margin: 0 0 0.75rem;
  color: #173f39;
  font-size: 1.2rem;
}

#kizu-feedback-panel label {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
}

#kizu-feedback-panel select,
#kizu-feedback-panel textarea,
#kizu-feedback-panel input {
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cfc7b9;
  border-radius: 8px;
  background: #fff;
  color: #24302e;
  font: inherit;
}

#kizu-feedback-panel textarea {
  min-height: 110px;
  resize: vertical;
}

.kizu-feedback-target {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #f6f2e9;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.kizu-feedback-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.kizu-feedback-error {
  min-height: 1.3em;
  margin: 0.6rem 0 0;
  color: #a52323;
  font-size: 0.82rem;
}

.kizu-feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.kizu-feedback-actions button {
  padding: 0.6rem 1.1rem;
  border: 1px solid #255b52;
  border-radius: 999px;
  cursor: pointer;
  font: 700 0.85rem/1.2 sans-serif;
}

.kizu-feedback-cancel {
  background: #fff;
  color: #255b52;
}

.kizu-feedback-send {
  background: #255b52;
  color: #fff;
}

.kizu-feedback-send:disabled {
  cursor: wait;
  opacity: 0.55;
}

#kizu-feedback-toast {
  position: fixed;
  z-index: 2147483006;
  bottom: 82px;
  left: 50%;
  display: none;
  padding: 0.65rem 1rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #255b52;
  box-shadow: 0 5px 18px rgb(0 0 0 / 24%);
  color: #fff;
  font: 700 0.85rem/1.2 sans-serif;
}

#kizu-feedback-toast.is-error {
  background: #a52323;
}

@media (max-width: 600px) {
  #kizu-feedback-button {
    right: 12px;
    bottom: 12px;
  }

  #kizu-feedback-panel {
    top: calc(var(--kizu-feedback-viewport-top, 0px) + 8px);
    right: auto;
    bottom: auto;
    left: calc(var(--kizu-feedback-viewport-left, 0px) + 8px);
    width: calc(var(--kizu-feedback-viewport-width, 100vw) - 16px);
    max-width: none;
    max-height: calc(var(--kizu-feedback-viewport-height, 100dvh) - 16px);
    padding: 1rem;
    transform: none;
  }

  #kizu-feedback-panel select,
  #kizu-feedback-panel textarea,
  #kizu-feedback-panel input {
    font-size: 16px;
    line-height: 1.5;
  }
}

@media print {
  #kizu-feedback-button,
  #kizu-feedback-overlay,
  #kizu-feedback-hint,
  #kizu-feedback-highlight,
  #kizu-feedback-panel,
  #kizu-feedback-toast {
    display: none !important;
  }
}
