/* 仅首页：问题反馈悬浮入口（与 home.css 变量风格一致） */

.home-feedback-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.home-feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
}

.home-feedback-backdrop[hidden] {
  display: none !important;
}

.home-feedback-ui {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.65rem;
  pointer-events: none;
}

.home-feedback-ui > * {
  pointer-events: auto;
}

.home-feedback-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: #f8fafc;
  background: #2563eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 2px 10px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.home-feedback-fab:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.home-feedback-fab:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.home-feedback-dialog {
  width: min(calc(100vw - 2rem), 300px);
  padding: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

.home-feedback-dialog[hidden] {
  display: none !important;
}

.home-feedback-dialog-inner {
  padding: 1rem 1rem 0.95rem;
}

.home-feedback-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.home-feedback-dialog-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.home-feedback-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin: -0.25rem -0.35rem 0 0;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.home-feedback-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.home-feedback-close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.home-feedback-desc {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #64748b;
}

.home-feedback-email {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  word-break: break-all;
}

.home-feedback-email a {
  color: #2563eb;
  text-decoration: none;
}

.home-feedback-email a:hover {
  text-decoration: underline;
}

.home-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.home-feedback-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.home-feedback-btn--primary:hover {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.home-feedback-btn--secondary {
  color: #1e293b;
  background: #fff;
  border-color: #cbd5e1;
}

.home-feedback-btn--secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.home-feedback-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .home-feedback-fab {
    transition: none !important;
  }

  .home-feedback-fab:hover {
    transform: none;
  }
}
