/* Lemur Feedback — 零依赖静态站样式（不引 CDN / 字体），深浅色自适应。
   主色取自 admin 的 app 图标：青 #14a4f5 → 蓝 #0b63e5 的渐变。 */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: #ffffff;
  --field-bg: #fbfcfe;
  --fg: #0f1720;
  --muted: #66748a;
  --line: #e4eaf3;
  --line-strong: #d2dbe9;
  --accent: #0b63e5;
  --accent-2: #14a4f5;
  --accent-fg: #ffffff;
  --accent-soft: rgba(11, 99, 229, 0.14);
  --accent-tint: rgba(11, 99, 229, 0.06);
  --ok-bg: #e9f8f0;
  --ok-fg: #0f7a43;
  --ok-line: #b7e6cd;
  --warn-bg: #fff6e6;
  --warn-fg: #8a5300;
  --warn-line: #f2dcb3;
  --err-bg: #fdeeee;
  --err-fg: #b42318;
  --err-line: #f4c8c5;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(15, 23, 32, 0.04), 0 24px 48px -24px rgba(15, 23, 32, 0.35);
  --shadow-tile: 0 1px 2px rgba(15, 23, 32, 0.08), 0 8px 16px -8px rgba(15, 23, 32, 0.28);
  --shadow-cta: 0 8px 20px -10px rgba(11, 99, 229, 0.85);
  --glow-1: rgba(20, 164, 245, 0.18);
  --glow-2: rgba(11, 99, 229, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1116;
    --card: #161b23;
    --field-bg: #11161d;
    --fg: #e9eef6;
    --muted: #97a3b4;
    --line: #242c38;
    --line-strong: #2f3947;
    --accent: #4f9bff;
    --accent-2: #24baff;
    --accent-fg: #08121f;
    --accent-soft: rgba(79, 155, 255, 0.20);
    --accent-tint: rgba(79, 155, 255, 0.10);
    --ok-bg: #122c1f;
    --ok-fg: #6ee7a8;
    --ok-line: #1f4a35;
    --warn-bg: #2e2310;
    --warn-fg: #ffd479;
    --warn-line: #4a381a;
    --err-bg: #331a1a;
    --err-fg: #ff9b9b;
    --err-line: #4d2626;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.75);
    --shadow-tile: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 16px -8px rgba(0, 0, 0, 0.6);
    --shadow-cta: 0 10px 22px -12px rgba(36, 186, 255, 0.75);
    --glow-1: rgba(36, 186, 255, 0.12);
    --glow-2: rgba(79, 155, 255, 0.10);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(52% 42% at 8% -8%, var(--glow-1), transparent 72%),
    radial-gradient(46% 38% at 102% 2%, var(--glow-2), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { color: var(--accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

.wrap { max-width: 660px; margin: 0 auto; padding: 26px 18px 64px; }

/* ── 页头 ─────────────────────────────────────────────── */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 18px;
}
header.site .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
/* 站标：admin 的 app 图标（自带白底圆角），外面再垫一层浅底托 */
.brand-tile {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-tile);
}
.brand-logo { width: 24px; height: 24px; border-radius: 7px; display: block; }

header.site nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
header.site nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
header.site nav a:hover {
  color: var(--fg);
  border-color: var(--line);
  background: var(--card);
}

/* 语言选择：<details> 做的下拉（零依赖、键盘可用；点外面/Esc 关闭由 i18n.js 负责） */
.lang { position: relative; }
.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--accent); color: var(--accent); }
.lang summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-globe { width: 15px; height: 15px; flex: none; color: var(--muted); }
.lang summary:hover .lang-globe, .lang[open] .lang-globe { color: var(--accent); }
.lang-caret { width: 11px; height: 11px; flex: none; color: var(--muted); transition: transform 0.15s ease; }
.lang[open] .lang-caret { transform: rotate(180deg); }
.lang-label { white-space: nowrap; }

.lang-menu {
  position: absolute;
  z-index: 30;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  min-width: 172px;
  max-height: min(64vh, 380px);
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
/* 菜单项要盖掉全局 button 的渐变/整宽/上浮 */
.lang-menu button {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--fg);
  box-shadow: none;
  font-size: 14px;
  font-weight: 550;
  text-align: start;
  transform: none;
}
.lang-menu button:hover:not(:disabled) {
  background: var(--accent-tint);
  color: var(--accent);
  filter: none;
  transform: none;
}
.lang-menu button.active { background: var(--accent-tint); color: var(--accent); font-weight: 650; }

/* ── 卡片 ─────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-top: 6px;
  overflow: hidden;
}
/* 顶部一条品牌渐变发丝线：整页最高级的那一点 */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent) 55%, transparent);
  opacity: 0.9;
}

h1 {
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.022em;
  margin: 4px 0 8px;
}
h2 { font-size: 18px; margin: 22px 0 8px; }
p { margin: 8px 0; }
.lead { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 8px 2px 0; }

/* ── 表单 ─────────────────────────────────────────────── */
.fieldset { margin-top: 22px; }
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.field { font-weight: 650; font-size: 13.5px; }        /* label 与 span 通用 */
label.field { display: inline-block; }
.opt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.counter {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  /* RTL 下别让「0 / 2000」被双向算法翻成「2000 / 0」 */
  direction: ltr;
  unicode-bidi: isolate;
}
.counter.near { color: var(--warn-fg); }

input[type="email"], input[type="text"], textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px;                                     /* <16px 时 iOS 聚焦会整页放大 */
  box-shadow: inset 0 1px 2px rgba(15, 23, 32, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.75; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea { min-height: 168px; line-height: 1.65; resize: vertical; }

/* 图片选择：虚线投放区（文件框本体藏起来，点哪儿都能唤起） */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.dropzone:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.dropzone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dz-icon { width: 26px; height: 26px; display: block; }
.dz-text { font-size: 14px; font-weight: 600; color: var(--fg); }
.dropzone:hover .dz-text, .dropzone:focus-within .dz-text { color: var(--accent); }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* ── 按钮 ─────────────────────────────────────────────── */
button {
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  min-height: 52px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 62%);
  color: var(--accent-fg);
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
@media (hover: hover) {
  button:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
}
button:active:not(:disabled) { transform: translateY(0); filter: brightness(0.98); }
button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; filter: saturate(0.7); }
button.secondary {
  background: var(--card);
  color: var(--fg);
  border-color: var(--line-strong);
  box-shadow: none;
}
button.secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button.small-btn { width: auto; min-height: 44px; padding: 10px 16px; font-size: 14px; }
#submit { margin-top: 24px; }
.hint.note { margin-top: 12px; text-align: center; }
#done { margin-top: 16px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

/* ── 提示条 ───────────────────────────────────────────── */
.banner {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 13px 15px 13px 17px;
  margin: 18px 0 4px;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;   /* RTL 下贴右边，用逻辑属性 */
  width: 3px;
  background: currentColor;
  opacity: 0.55;
}
.banner.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.banner.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-line); }
.banner.err { background: var(--err-bg); color: var(--err-fg); border-color: var(--err-line); }
.banner strong { display: block; font-weight: 650; margin-bottom: 1px; }

.status-line { display: flex; gap: 8px; align-items: baseline; margin: 6px 0; font-size: 15px; }
.status-line .k { color: var(--muted); min-width: 60px; }

/* ── 缩略图 ───────────────────────────────────────────── */
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field-bg);
  box-shadow: var(--shadow-tile);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 4px; inset-inline-end: 4px;
  width: 24px; height: 24px; min-height: 0; padding: 0;
  font-size: 13px; line-height: 1; border-radius: 50%;
  background: rgba(15, 23, 32, 0.62);
  color: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.thumb button:hover:not(:disabled) { transform: none; filter: brightness(1.15); }

ol.steps { padding-inline-start: 20px; }
ol.steps li { margin: 10px 0; }

.spinner { color: var(--muted); font-size: 14px; }

/* ── 小屏（媒体查询必须在文件末尾，否则会被上面的规则盖掉） ── */
@media (max-width: 520px) {
  .wrap { padding: 18px 14px 48px; }
  .card { padding: 20px 18px 22px; border-radius: 16px; }
  h1 { font-size: 23px; }
  header.site { padding-bottom: 14px; }
  .brand-tile { width: 32px; height: 32px; border-radius: 10px; }
  .brand-logo { width: 22px; height: 22px; }
  textarea { min-height: 150px; }
  .thumb { width: 78px; height: 78px; }
}
