/* 云息测评 · 暖色独立样式（尽量不依赖站内 styles.css 也能用） */
:root {
  --yx-bg: #faf6f1;
  --yx-surface: #fffdf9;
  --yx-card: #ffffff;
  --yx-ink: #3d342c;
  --yx-muted: #8a7a6b;
  --yx-line: #eadfd4;
  --yx-accent: #c4785a;
  --yx-accent-soft: #f3e0d6;
  --yx-accent-deep: #a85d42;
  --yx-ok: #6b8f71;
  --yx-warn: #c49a3c;
  --yx-danger: #b85c5c;
  --yx-radius: 16px;
  --yx-shadow: 0 8px 28px rgba(61, 52, 44, 0.06);
  --yx-font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--yx-bg);
  color: var(--yx-ink);
  font-family: var(--yx-font);
  line-height: 1.65;
  min-height: 100%;
}

a { color: var(--yx-accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.yx-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 16px 48px;
}

.yx-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 14px;
}
.yx-nav .brand {
  font-weight: 600;
  color: var(--yx-ink);
  letter-spacing: 0.02em;
}
.yx-nav .links { display: flex; gap: 16px; color: var(--yx-muted); }

.yx-hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.yx-hero p {
  margin: 0;
  color: var(--yx-muted);
  font-size: 14px;
}

.yx-banner {
  margin: 14px 0 18px;
  padding: 10px 14px;
  background: var(--yx-accent-soft);
  border: 1px solid var(--yx-line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--yx-ink);
}

.yx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.yx-card {
  background: var(--yx-card);
  border: 1px solid var(--yx-line);
  border-radius: var(--yx-radius);
  box-shadow: var(--yx-shadow);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.yx-card h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}
.yx-card .meta {
  font-size: 12px;
  color: var(--yx-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yx-card .desc {
  font-size: 13px;
  color: var(--yx-muted);
  flex: 0 1 auto;
  margin: 0;
}
.yx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.yx-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3eee8;
  color: var(--yx-muted);
  border: 1px solid var(--yx-line);
}
.yx-tag.free { background: #eef5ef; color: var(--yx-ok); border-color: #d5e6d8; }
.yx-tag.paid { background: var(--yx-accent-soft); color: var(--yx-accent-deep); border-color: #e8cfc3; }
.yx-tag.undecided { background: #f7f1e3; color: var(--yx-warn); border-color: #ead9b0; }

.yx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.yx-btn:active { transform: scale(0.98); }
.yx-btn.primary {
  background: var(--yx-accent);
  color: #fff;
}
.yx-btn.primary:hover { background: var(--yx-accent-deep); }
.yx-btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.yx-btn.ghost {
  background: transparent;
  color: var(--yx-muted);
  border: 1px solid var(--yx-line);
}
.yx-btn.ghost:hover { background: #f5efe9; }
.yx-btn.block { width: 100%; }

.yx-progress {
  height: 6px;
  background: #efe6dc;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 20px;
}
.yx-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d49274, var(--yx-accent));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.yx-panel {
  background: var(--yx-surface);
  border: 1px solid var(--yx-line);
  border-radius: var(--yx-radius);
  box-shadow: var(--yx-shadow);
  padding: 24px 22px;
}

.yx-q-num {
  font-size: 12px;
  color: var(--yx-muted);
  margin-bottom: 8px;
}
.yx-q-text {
  font-size: 18px;
  font-weight: 560;
  margin: 0 0 18px;
  line-height: 1.45;
}

.yx-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.yx-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border: 1px solid var(--yx-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.yx-option:hover { border-color: #dfc4b4; background: #fffaf7; }
.yx-option.selected {
  border-color: var(--yx-accent);
  background: var(--yx-accent-soft);
}
.yx-option input { margin-top: 3px; accent-color: var(--yx-accent); }
.yx-option .key {
  font-weight: 600;
  color: var(--yx-accent-deep);
  min-width: 1.2em;
}
.yx-option .label { flex: 1; font-size: 14px; }

.yx-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}


.yx-result-img {
  display: block;
  width: min(100%, 280px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  margin: 0 auto 18px;
  background: var(--yx-accent-soft);
  border: 1px solid var(--yx-line);
  box-shadow: 0 6px 18px rgba(61, 52, 44, 0.06);
}

.yx-result h2 {
  font-size: 22px;
  margin: 0 0 12px;
}
.yx-result .body {
  white-space: pre-wrap;
  font-size: 15px;
  color: var(--yx-ink);
}
.yx-result .disclaimer {
  margin-top: 20px;
  padding: 12px 14px;
  background: #f7f1ea;
  border-radius: 10px;
  font-size: 12px;
  color: var(--yx-muted);
  border: 1px solid var(--yx-line);
}

.yx-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fbebeb;
  border: 1px solid #efc8c8;
  color: var(--yx-danger);
  border-radius: 10px;
  font-size: 13px;
}

.yx-preamble textarea,
.yx-preamble select {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--yx-line);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--yx-ink);
}
.yx-preamble label {
  font-size: 13px;
  color: var(--yx-muted);
  display: block;
}

.yx-foot {
  margin-top: 40px;
  font-size: 12px;
  color: var(--yx-muted);
  text-align: center;
}

@media (max-width: 560px) {
  .yx-hero h1 { font-size: 24px; }
  .yx-q-text { font-size: 16px; }
}

/* —— 分享海报弹层 —— */
.yx-share-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: var(--yx-font);
}
.yx-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 52, 44, 0.45);
}
.yx-share-sheet {
  position: relative;
  width: min(100%, 440px);
  max-height: min(92vh, 920px);
  margin: 0 auto;
  background: var(--yx-surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(61, 52, 44, 0.18);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.yx-share-hint {
  text-align: center;
  font-size: 13px;
  color: var(--yx-muted);
  padding: 2px 8px 0;
}
.yx-share-img-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #efe6dc;
  border: 1px solid var(--yx-line);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.yx-share-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  /* 便于微信内长按保存 */
  -webkit-touch-callout: default;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}
.yx-share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: stretch;
}
.yx-share-actions .yx-btn {
  flex: 1;
  min-width: 120px;
}

@media (min-width: 560px) {
  .yx-share-modal {
    align-items: center;
    padding: 24px;
  }
  .yx-share-sheet {
    border-radius: 20px;
    max-height: min(88vh, 900px);
  }
}
