/*
 * 万能提示词 · 运营板块子页样式
 * ---------------------------------------------------------------
 * 设计取向：品牌橙渐变 + 卡片浮起 + 分类横滑吸顶，走"高级但不陌生"的路子
 * 沿用公开变量：--primary / --grad / --card / --text / --text2 / --radius
 *
 * ⚠️ 两条本项目踩过的坑，写样式时必须守住：
 *   ① 含 absolute 装饰物（光晕、角标）的容器必须自带 position: relative
 *      —— 否则装饰物会撑宽 document，手机端整页被浏览器缩成 77%
 *   ② hidden 属性会被 display:grid / flex 盖掉，必须显式补 [hidden]{display:none}
 */

#sub-wanneng {
  padding-bottom: 88px; /* fixed TabBar 实测高约 74px，多留一点 */
}

/* ---------------- 顶部 hero ---------------- */
.wn-hero {
  position: relative;            /* ← 见文件头警告① */
  overflow: hidden;
  margin: 4px 16px 14px;
  padding: 20px 18px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ff8845 0%, #f94400 100%);
  box-shadow: 0 14px 32px -14px rgba(249, 68, 0, .55);
  color: #fff;
}

.wn-hero-glow {
  position: absolute;
  top: -60px; right: -50px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.wn-hero-tag {
  position: relative;
  display: inline-block;
  padding: 3px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .3px;
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
}

.wn-hero-name {
  position: relative;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.15;
}

.wn-hero-sub {
  position: relative;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
}

.wn-hero-stat {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.wn-hero-stat span {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, .2);
}

/* 搜索框 */
.wn-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0 14px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 16px -8px rgba(120, 40, 0, .5);
}

.wn-search-ico {
  font-size: 15px;
  line-height: 1;
  opacity: .55;
}

.wn-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  color: var(--text);
  font-family: inherit;
}

.wn-search input::placeholder { color: #bda99c; }

/* ---------------- 分类横滑 ---------------- */
.wn-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wn-cats::-webkit-scrollbar { display: none; }

.wn-cat {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #8a6f5d;
  background: #fff;
  border: 1px solid #f5e4d8;
  transition: all .16s ease;
  cursor: pointer;
  white-space: nowrap;
}

.wn-cat .n {
  font-size: 11px;
  font-weight: 600;
  color: #c0a696;
}

.wn-cat.on {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(249, 68, 0, .9);
}
.wn-cat.on .n { color: rgba(255, 255, 255, .8); }

/* ---------------- 工具网格 ---------------- */
.wn-count {
  padding: 0 18px 10px;
  font-size: 12px;
  color: var(--text2);
}

.wn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}

.wn-card {
  position: relative;          /* ← 卡片内有角标装饰 */
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 13px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid #f7e9de;
  box-shadow: 0 4px 14px -10px rgba(150, 80, 30, .5);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}

.wn-card:active {
  transform: scale(.975);
  box-shadow: 0 2px 8px -6px rgba(150, 80, 30, .6);
}

.wn-card-ico {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 17px;
  background: var(--chip-bg);
}

.wn-card-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.wn-card-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wn-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text2);
}

/* ---------------- 运行视图 ---------------- */
.wn-run[hidden] { display: none !important; }
.wn-list[hidden] { display: none !important; }

.wn-run-head {
  position: relative;
  margin: 4px 16px 12px;
  padding: 16px 16px 15px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid #f7e9de;
  box-shadow: 0 8px 22px -16px rgba(150, 80, 30, .7);
}

.wn-run-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.wn-run-ico {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 21px;
  background: var(--chip-bg);
}

.wn-run-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.wn-run-cat {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text2);
}

.wn-run-desc {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed #f2e2d6;
  font-size: 12.5px;
  line-height: 1.65;
  color: #8a6f5d;
}

.wn-input-wrap {
  margin: 0 16px;
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid #f7e9de;
}

.wn-input-wrap textarea {
  width: 100%;
  min-height: 84px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  font-family: inherit;
}

.wn-input-wrap textarea::placeholder { color: #c3ada0; }

.wn-input-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 10px;
}

.wn-counter {
  font-size: 11.5px;
  color: #c0a696;
}

.wn-gen {
  position: relative;
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 20px -12px rgba(249, 68, 0, .95);
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}

.wn-gen:active { transform: scale(.97); }
.wn-gen[disabled] { opacity: .5; box-shadow: none; cursor: default; }

/* 结果区 */
.wn-out {
  position: relative;
  margin: 14px 16px 0;
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid #f7e9de;
  box-shadow: 0 8px 24px -18px rgba(150, 80, 30, .8);
}

.wn-out[hidden] { display: none !important; }

.wn-out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.wn-out-title {
  font-size: 13px;
  font-weight: 700;
  color: #b06a3a;
  letter-spacing: .3px;
}

.wn-out-tools { display: flex; gap: 8px; }

.wn-mini {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #f2dccb;
  background: #fff8f3;
  color: #b06a3a;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.wn-mini:active { background: #ffefe3; }

.wn-out-body {
  font-size: 15px;
  line-height: 1.78;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.wn-out-body.is-streaming::after {
  content: '▍';
  color: var(--primary);
  animation: wn-blink 1s steps(2, start) infinite;
}

@keyframes wn-blink { to { opacity: 0; } }

.wn-out-tip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #f2e2d6;
  font-size: 11.5px;
  color: var(--text2);
}

.wn-out-err { color: var(--danger); font-size: 13.5px; line-height: 1.7; }

/* 空态骨架 */
.wn-skel {
  padding: 60px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text2);
}

@media (min-width: 560px) {
  .wn-grid { grid-template-columns: repeat(3, 1fr); }
}
