/* ============================================================
   姻缘测算 H5 样式（红金喜庆风 · 移动端优先）
   入口页面：/yy  、  /yy/report  、  /yy/get
   ============================================================ */

:root {
  --red-900: #6f0a11;
  --red-800: #8d0f18;
  --red-700: #a8121f;
  --red-600: #c31f2c;
  --red-500: #d8343b;
  --gold-100: #fff8dc;
  --gold-200: #ffefb8;
  --gold-300: #ffe08a;
  --gold-400: #f7cf64;
  --gold-500: #e8b33f;
  --gold-600: #c9922b;
  --gold-700: #9c6c18;
  --cream: #fffaf0;
  --ink: #4a2a20;
  --sub: #8d6b57;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body.yy-body {
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(120% 70% at 50% 0%, #d0242f 0%, #a8121f 38%, #7a0b13 70%, #5c060d 100%) fixed;
  position: relative;
  overflow-x: hidden;
}

/* 金色暗纹（云纹点阵），纯 CSS/SVG，不依赖图片 */
body.yy-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .20;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23f7cf64' stroke-width='1.2'><circle cx='30' cy='30' r='14'/><circle cx='30' cy='30' r='5'/><path d='M90 26c8 0 14 6 14 14s-6 14-14 14'/><circle cx='90' cy='96' r='14'/><circle cx='90' cy='96' r='5'/><path d='M30 78c-8 0-14 6-14 14s6 14 14 14'/></g></svg>");
  background-size: 120px 120px;
}

/* 顶部灯笼光晕 */
body.yy-body::after {
  content: "";
  position: fixed;
  top: -140px;
  left: 50%;
  width: 900px;
  height: 420px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 214, 120, .35) 0%, rgba(255, 180, 90, .12) 45%, rgba(255, 160, 80, 0) 70%);
}

.yy-stage {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 18px 34px;
}

/* 两侧灯笼 */
.yy-lantern {
  position: absolute;
  top: -10px;
  width: 34px;
  height: 52px;
  border-radius: 50% / 42%;
  background: radial-gradient(circle at 50% 35%, #ff6b5a 0%, #d81f28 55%, #8e0c14 100%);
  box-shadow: 0 0 22px rgba(255, 140, 90, .55), inset 0 -6px 10px rgba(0, 0, 0, .28);
  opacity: .95;
}
.yy-lantern::before,
.yy-lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300), var(--gold-600));
}
.yy-lantern::before { top: -5px; }
.yy-lantern::after { bottom: -5px; }
.yy-lantern.left { left: 6px; animation: yyFloat 4.6s ease-in-out infinite; }
.yy-lantern.right { right: 6px; animation: yyFloat 4.6s ease-in-out infinite .8s; }

@keyframes yyFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(8px) rotate(2deg); }
}

/* ============ 首屏标题区 ============ */
.yy-hero {
  text-align: center;
  padding: 20px 0 8px;
}

/* 通栏主视觉（插画） */
.yy-art {
  position: relative;
  margin: 0 -18px;
  height: 336px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.yy-art img {
  width: 100%;
  height: 336px;
  object-fit: cover;
  object-position: 50% 6%;
  display: block;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 84%, transparent 100%);
}

/* 没有插画时的中式印章兜底 */
.yy-seal {
  width: 116px;
  height: 116px;
  margin: 0 auto 108px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: #fff3cf;
  border-radius: 50%;
  border: 3px solid rgba(255, 224, 138, .9);
  box-shadow: 0 0 0 9px rgba(255, 224, 138, .16), inset 0 0 26px rgba(255, 214, 120, .38);
  background: radial-gradient(circle at 50% 40%, #c31f2c 0%, #8d0f18 70%, #6f0a11 100%);
  font-family: "STKaiti", "KaiTi", serif;
}
.yy-art.no-img { height: 210px; }
.yy-art.no-img .yy-seal { display: flex; margin-bottom: 30px; }

.yy-title {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: 7px;
  font-weight: 900;
  text-indent: 7px;
  background: linear-gradient(180deg, #fffbe8 0%, #ffe9a5 32%, #f3c353 58%, #c9922b 78%, #f6d98a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(90, 12, 12, .55)) drop-shadow(0 0 14px rgba(255, 200, 90, .45));
}

.yy-sub {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 16px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold-100);
  border-radius: 999px;
  border: 1px solid rgba(255, 224, 138, .55);
  background: rgba(120, 10, 16, .45);
  box-shadow: inset 0 0 12px rgba(255, 200, 100, .18);
}

/* ============ 表单卡片 ============ */
.yy-card {
  margin-top: -16px;
  padding: 8px 16px 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf6 0%, #fff8e8 55%, #fdf2d9 100%);
  border: 2px solid rgba(201, 146, 43, .55);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .10),
    0 16px 34px rgba(50, 0, 0, .38),
    inset 0 0 32px rgba(255, 214, 140, .30);
  position: relative;
}

/* 卡片四角金饰 */
.yy-card::before,
.yy-card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold-600);
  opacity: .75;
}
.yy-card::before { top: 7px; left: 7px; width: 15px; height: 15px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; opacity: .55; }
.yy-card::after { bottom: 7px; right: 7px; width: 15px; height: 15px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; opacity: .55; }

.yy-row {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px dashed rgba(201, 146, 43, .45);
}
.yy-row:last-of-type { border-bottom: 0; }

.yy-row label {
  flex: 0 0 92px;
  font-size: 15px;
  font-weight: 600;
  color: #7a3b2a;
  letter-spacing: .5px;
}

.yy-row input[type="text"],
.yy-row input[type="tel"],
.yy-row input[type="date"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 4px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}
.yy-row input::placeholder { color: #bda18c; font-size: 14px; }
.yy-row input[type="date"] { color: #7a3b2a; }

/* 性别药丸 */
.yy-gender { display: flex; gap: 10px; }
.yy-gender button {
  min-width: 62px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 146, 43, .65);
  background: #fffdf7;
  color: #8a5a3a;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: .18s;
}
.yy-gender button.on {
  background: linear-gradient(180deg, #d8343b, #a8121f);
  border-color: var(--gold-400);
  color: #fff6dc;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(168, 18, 31, .35);
}

/* 价格提示 */
.yy-price-tip {
  margin: 12px 2px 0;
  text-align: right;
  font-size: 12px;
  color: #a8763f;
}

/* 主按钮 */
.yy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  text-indent: 3px;
  color: #8c1616;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffeeb4 0%, #f9d375 42%, #e5ab35 78%, #c98f24 100%);
  box-shadow: 0 6px 0 #9d6a17, 0 14px 26px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.yy-btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #9d6a17, 0 8px 16px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.yy-btn::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 40%;
  height: 220%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(18deg);
  animation: yyShine 3.4s ease-in-out infinite;
}
@keyframes yyShine {
  0% { left: -35%; }
  55%, 100% { left: 125%; }
}
.yy-btn[disabled] { opacity: .62; }

/* 协议行 */
.yy-agree {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding: 0 6px;
  line-height: 1.9;
  font-size: 12.5px;
  color: #9a7059;
}
.yy-agree input { width: 15px; height: 15px; accent-color: #c9922b; }
.yy-agree a, .yy-agree span.link {
  color: #b81722;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

/* ============ 报告页 ============ */
.yy-report-head {
  text-align: center;
  padding: 10px 0 4px;
  color: var(--gold-100);
}
.yy-report-pair {
  font-size: 15px;
  letter-spacing: 1px;
  opacity: .92;
}

.yy-score-ring {
  width: 168px;
  height: 168px;
  margin: 16px auto 6px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, #fff8e3 0%, #fff2cd 55%, #f8e0a2 100%);
  border: 3px solid rgba(201, 146, 43, .85);
  box-shadow:
    0 0 0 8px rgba(255, 224, 138, .14),
    0 0 0 12px rgba(255, 224, 138, .07),
    0 14px 30px rgba(50, 0, 0, .32);
}
.yy-score-num {
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
  color: #b81722;
  font-family: Georgia, "Times New Roman", serif;
}
.yy-score-num small { font-size: 18px; font-weight: 700; margin-left: 2px; }
.yy-score-level {
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: 2px;
  color: #9c6c18;
  font-weight: 700;
}

.yy-sec {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf7, #fff7e6);
  border: 1px solid rgba(201, 146, 43, .35);
  box-shadow: 0 6px 16px rgba(50, 0, 0, .18);
}
.yy-sec h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #8d0f18;
  display: flex;
  align-items: center;
  gap: 8px;
}
.yy-sec h3::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
}
.yy-sec p {
  margin: 0;
  font-size: 14px;
  line-height: 1.78;
  color: #5b4034;
  text-align: justify;
}

/* 手机号领取区 */
.yy-claim {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 250, 235, .12), rgba(255, 250, 235, .05));
  border: 1px solid rgba(255, 224, 138, .45);
}
.yy-claim h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--gold-100);
  letter-spacing: 1px;
}
.yy-claim p.hint {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #f2d7a6;
  opacity: .9;
}
.yy-claim .yy-row { border-bottom: 1px solid rgba(255, 224, 138, .35); }
.yy-claim .yy-row label { color: #ffe9a5; flex: 0 0 74px; }
.yy-claim .yy-row input { color: #fff8e6; }
.yy-claim .yy-row input::placeholder { color: rgba(255, 233, 165, .55); }

/* 测试模式提示 */
.yy-mock-tip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #ffe9a5;
  background: rgba(0, 0, 0, .22);
  border: 1px dashed rgba(255, 224, 138, .5);
  word-break: break-all;
}
.yy-mock-tip a { color: #fff3cf; }

/* ============ 领取页 ============ */
.yy-get-card {
  margin-top: 16px;
  padding: 20px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf6, #fff7e6);
  border: 2px solid rgba(201, 146, 43, .55);
  box-shadow: 0 16px 34px rgba(50, 0, 0, .34);
  text-align: center;
}
.yy-get-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff6dc;
  background: linear-gradient(180deg, #d8343b, #8d0f18);
  border: 2px solid var(--gold-400);
  box-shadow: 0 8px 18px rgba(141, 15, 24, .35);
}
.yy-get-card h2 { margin: 0 0 6px; font-size: 19px; color: #8d0f18; }
.yy-get-card .desc { margin: 0 0 16px; font-size: 13.5px; color: var(--sub); line-height: 1.7; }

.yy-qr-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed rgba(201, 146, 43, .65);
}
.yy-qr-box img { width: 176px; height: 176px; display: block; margin: 0 auto 8px; object-fit: contain; }
.yy-qr-box .qr-text { font-size: 12.5px; color: var(--sub); line-height: 1.7; }

/* 提示页 */
.yy-tip {
  margin-top: 64px;
  text-align: center;
  color: var(--gold-100);
}
.yy-tip h2 { font-size: 20px; margin: 0 0 12px; }
.yy-tip p { font-size: 14px; color: #f0d6a6; line-height: 1.8; }

/* 页脚 */
.yy-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(255, 233, 165, .62);
}

/* 底部：客服入口 + 认证徽标 */
.yy-service {
  margin-top: 20px;
  text-align: center;
}
.yy-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255, 226, 160, .86);
}
.yy-help-icon {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 214, 132, .78);
}
.yy-help-link {
  color: #ffe9a5;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.yy-help-link:active { opacity: .65; }

.yy-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 13px;
}
.yy-badges img {
  display: block;
  width: auto;
  height: 32px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(60, 0, 0, .22);
}

/* 弹窗（协议 / 提示） */
.yy-modal {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .55);
}
.yy-modal.show { display: flex; }
.yy-modal-box {
  width: 100%;
  max-width: 340px;
  max-height: 74vh;
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: #fffdf7;
  border: 1px solid rgba(201, 146, 43, .55);
  font-size: 13px;
  line-height: 1.8;
  color: #5b4034;
}
.yy-modal-box h4 { margin: 0 0 10px; font-size: 16px; color: #8d0f18; text-align: center; }
.yy-modal-box .yy-modal-close {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff6dc;
  background: linear-gradient(180deg, #d8343b, #a8121f);
  font-family: inherit;
}

/* 轻提示 */
.yy-toast {
  position: fixed;
  left: 50%;
  bottom: 22%;
  z-index: 120;
  transform: translateX(-50%) translateY(10px);
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  color: #fff8e6;
  background: rgba(40, 10, 12, .9);
  opacity: 0;
  transition: .25s;
  pointer-events: none;
}
.yy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 加载中 */
.yy-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 130;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
}
.yy-loading.show { display: flex; }
.yy-loading .dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 224, 138, .28);
  border-top-color: var(--gold-400);
  animation: yySpin .8s linear infinite;
}
@keyframes yySpin { to { transform: rotate(360deg); } }

/* 领取页：卡片内的页脚改用深色（米色底上浅色不可读） */
.yy-get-card .yy-foot {
  color: #a8886f;
}
.yy-get-card .yy-btn {
  text-decoration: none;
  line-height: 1;
}
