/* =========================================================
   尚栈 · 好评文案生成页 · 样式
   ---------------------------------------------------------
   与 prototype/index.html 同一套视觉语言（红金、米底），
   移动端优先，最宽 520px。
   ========================================================= */

:root {
  --red: #c1272d;
  --red-deep: #8f1418;
  --gold: #c9a227;
  --bg: #fbf6f4;
  --card: #fff;
  --text: #2b2b2b;
  --muted: #9a8b88;
  --line: #f0e3e0;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.app { max-width: 520px; margin: 0 auto; }

header {
  background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 100%);
  color: #fff; padding: 26px 20px 22px; text-align: center;
  border-bottom-left-radius: 22px; border-bottom-right-radius: 22px;
}
header h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: 2px; }
header p { margin: 8px 0 0; font-size: 13px; color: rgba(255,255,255,.82); }

.body { padding: 16px 16px 0; }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 7px; color: var(--red); letter-spacing: .5px;
}
select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 13px 38px 13px 14px;
  font-size: 16px; color: var(--text); font-family: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c9a227' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:disabled { color: #bdb2af; background-color: #f7f3f2; }

.hint { font-size: 12.5px; color: var(--muted); padding: 6px 2px 0; }

/* =========================================================
   【第四阶段】隐藏但保留功能的选项
   ---------------------------------------------------------
   使用场景 / 文案类型 / 写作方式 三项在页面上不再显示，
   但 DOM 节点保留在文档里 —— 后台配置仍然照常参与生成，
   后续若要恢复显示，只要去掉这个类即可。
   ========================================================= */
.hidden-field { display: none !important; }

/* 《好评须知》悬浮入口 */
.fab {
  position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 90; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 15px; border-radius: 999px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: .5px;
  text-decoration: none; box-shadow: 0 6px 18px rgba(143,20,24,.28);
}
.fab:active { transform: scale(.97); }
@media (min-width: 560px) {
  .fab { right: max(16px, calc(50vw - 260px + 16px)); }
}

button.primary {
  width: 100%; margin-top: 4px; padding: 15px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 1px;
  font-family: inherit; cursor: pointer;
}
button.primary:active { transform: scale(.99); }
button.primary:disabled { background: #e6dcda; color: #b3a5a2; }

.card {
  margin-top: 16px; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(140,20,24,.07);
  padding: 20px 18px 18px; border: 1px solid #f6ecea;
}
.card .tag {
  display: inline-block; font-size: 12px; color: var(--red);
  background: #fdf1f0; border: 1px solid #f4dcda;
  border-radius: 999px; padding: 4px 11px; margin-bottom: 12px;
}
.card .text {
  margin: 0; font-size: 16.5px; line-height: 1.95; letter-spacing: .3px;
  white-space: pre-wrap; word-break: break-word;
}
.card .meta { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* 【第四阶段】本次带入的客观产品描述提示 */
.desc-note {
  margin-top: 10px; padding: 8px 11px; border-radius: 10px;
  background: #fdf7f0; border: 1px solid #f2e4d0;
  font-size: 12.5px; color: #8a6a3c; line-height: 1.7;
}
.card button.primary { margin-top: 16px; }
button.ghost {
  width: 100%; margin-top: 9px; padding: 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  font-size: 14px; font-family: inherit; cursor: pointer;
}
button.ghost:active { background: #faf6f5; }

.foot { margin-top: 20px; padding: 0 2px; }
.foot-line { font-size: 12px; color: var(--muted); line-height: 1.9; }
.foot-line a { color: var(--red); text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(16px);
  background: rgba(143,20,24,.95); color: #fff; padding: 11px 20px;
  border-radius: 22px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 99; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
