/* Ufold 反馈组件 — 与原页面设计语言保持一致（变量继承自 :root） */

.ufeedback-open {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(77, 146, 127, .42);
  border-radius: 999px;
  background: rgba(77, 146, 127, .08);
  color: #397764;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.ufeedback-open:hover {
  background: rgba(77, 146, 127, .16);
  border-color: rgba(77, 146, 127, .68);
  transform: translateY(-1px);
}

/* 开始界面的悬浮按钮（仅 start-screen 内可见） */
.ufeedback-fab {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  z-index: 42;
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid rgba(77, 146, 127, .42);
  border-radius: 999px;
  background: rgba(255, 255, 252, .82);
  box-shadow: 0 10px 30px rgba(67, 66, 60, .08);
  color: #397764;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background .18s ease, transform .18s ease;
}
.ufeedback-fab:hover {
  background: rgba(77, 146, 127, .14);
  transform: translateY(-1px);
}

/* 弹窗 */
.ufeedback-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(48, 52, 50, .42);
  backdrop-filter: blur(6px);
}
.ufeedback-modal.ufeedback-hidden {
  display: none;
}
.ufeedback-card {
  width: min(560px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: 28px 30px;
  border-radius: 26px;
  background: var(--panel, rgba(250, 248, 242, .96));
  box-shadow: var(--shadow, 0 18px 50px rgba(67, 66, 60, .1));
}
.ufeedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ufeedback-head h2 {
  margin: 0;
  font: 800 24px "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: .02em;
  color: var(--ink, #303432);
}
.ufeedback-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line, #d9d7d0);
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #747976);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.ufeedback-close:hover {
  background: rgba(191, 100, 105, .08);
  color: var(--danger, #bf6469);
}
.ufeedback-copy {
  margin: 6px 0 18px;
  color: var(--muted, #747976);
  font-size: 12px;
  line-height: 1.6;
}
.ufeedback-identity {
  margin-bottom: 12px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(77, 146, 127, .09);
  color: #397764;
  font-size: 11px;
  font-weight: 700;
}
.ufeedback-identity.ufeedback-hidden {
  display: none;
}
.ufeedback-field {
  display: block;
  margin-bottom: 10px;
}
.ufeedback-field.ufeedback-hidden {
  display: none;
}
.ufeedback-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted, #747976);
  font-size: 11px;
  font-weight: 700;
}
.ufeedback-field input,
.ufeedback-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line, #d9d7d0);
  border-radius: 13px;
  background: rgba(255, 255, 252, .8);
  color: var(--ink, #303432);
  font: 500 13px/1.6 "Noto Sans SC", sans-serif;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.ufeedback-field input:focus,
.ufeedback-field textarea:focus {
  border-color: var(--mint, #4d927f);
  box-shadow: 0 0 0 3px rgba(77, 146, 127, .12);
}
.ufeedback-field textarea {
  min-height: 120px;
  resize: vertical;
}
.ufeedback-error {
  min-height: 18px;
  margin-top: 8px;
  color: var(--danger, #bf6469);
  font-size: 11px;
  font-weight: 700;
}
.ufeedback-error:empty {
  display: none;
}
.ufeedback-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4d927f, #3c7a6a);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}
.ufeedback-submit:hover {
  transform: translateY(-1px);
}
.ufeedback-submit:disabled {
  cursor: wait;
  opacity: .62;
}
.ufeedback-history {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #d9d7d0);
}
.ufeedback-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted, #747976);
  font-size: 12px;
  font-weight: 800;
}
.ufeedback-history-by-email {
  border: 0;
  background: transparent;
  color: #397764;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.ufeedback-history-by-email.ufeedback-hidden {
  display: none;
}
.ufeedback-lookup {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.ufeedback-lookup.ufeedback-hidden {
  display: none;
}
.ufeedback-lookup input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line, #d9d7d0);
  border-radius: 11px;
  background: rgba(255, 255, 252, .8);
  color: var(--ink, #303432);
  font-size: 12px;
  outline: none;
}
.ufeedback-lookup input:focus {
  border-color: var(--mint, #4d927f);
}
.ufeedback-lookup-go {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(77, 146, 127, .42);
  border-radius: 999px;
  background: rgba(77, 146, 127, .08);
  color: #397764;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.ufeedback-lookup-go:hover {
  background: rgba(77, 146, 127, .16);
}
.ufeedback-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ufeedback-empty {
  color: #a0a39f;
  font-size: 11px;
  padding: 4px 0;
}
.ufeedback-item {
  padding: 11px 13px;
  border: 1px solid var(--line, #d9d7d0);
  border-radius: 12px;
  background: rgba(255, 255, 252, .6);
}
.ufeedback-item p {
  margin: 4px 0 0;
  color: var(--ink, #303432);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.ufeedback-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted, #747976);
  font-size: 10px;
  font-weight: 700;
}
.ufeedback-item-meta time {
  flex: 0 0 auto;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}
.ufeedback-admin {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  border: 1px dashed rgba(191, 100, 105, .5);
  border-radius: 12px;
  background: rgba(191, 100, 105, .05);
  color: #a34e54;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.ufeedback-admin.ufeedback-hidden {
  display: none;
}
.ufeedback-admin:hover {
  background: rgba(191, 100, 105, .1);
}
.ufeedback-admin-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ufeedback-admin-list.ufeedback-hidden {
  display: none;
}
.ufeedback-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  transform: translateX(-50%) translateY(12px);
  padding: 11px 18px;
  border-radius: 999px;
  background: #303432;
  color: #f2eee5;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ufeedback-toast.ufeedback-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
  .ufeedback-fab {
    top: 12px;
    left: 12px;
    padding: 7px 13px;
    font-size: 12px;
  }
  .ufeedback-card {
    padding: 22px 18px;
    border-radius: 22px;
  }
}

/* 语言切换按钮 */
.ufold-lang-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 145;
  min-width: 46px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(77, 146, 127, .42);
  border-radius: 999px;
  background: rgba(255, 255, 252, .82);
  box-shadow: 0 10px 30px rgba(67, 66, 60, .08);
  color: #397764;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background .18s ease, transform .18s ease;
}
.ufold-lang-btn:hover {
  background: rgba(77, 146, 127, .14);
  transform: translateY(-1px);
}
@media (max-width: 520px) {
  .ufold-lang-btn {
    bottom: 14px;
    right: 14px;
  }
}
