/* ===========================================================
   颜究所 Aesthetic Lab · 视觉系统
   风格：低饱和奶油系 / 简约 / 柔和圆角 / 亲肤质感
   =========================================================== */

:root {
  /* 底色 */
  --bg: #fbf7f4;
  --bg-soft: #fdf5f1;
  --card: #ffffff;

  /* 主色（低饱和） */
  --peach: #efc6bf;      /* 蜜桃粉 */
  --peach-deep: #e0a79e;
  --rose: #f4dcd6;
  --lavender: #cdc8de;   /* 雾紫 */
  --mint: #c6d9cf;       /* 雾绿 */
  --butter: #f6e7d2;     /* 奶油杏 */
  --sky: #c9d6e2;        /* 雾蓝 */

  /* 文字 */
  --ink: #4c4441;
  --ink-2: #7d726c;
  --ink-3: #a89e98;

  /* 线条与阴影 */
  --line: #f1e6e0;
  --line-2: #ece2dc;
  --shadow-s: 0 2px 8px rgba(196, 166, 158, 0.08);
  --shadow-m: 0 8px 24px rgba(196, 166, 158, 0.12);
  --shadow-l: 0 16px 40px rgba(196, 166, 158, 0.16);

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 24px;
  --r-xl: 32px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.02em;
  /* 柔和的暖色渐变光斑 */
  background-image:
    radial-gradient(900px 460px at 12% -8%, #fdeee9 0%, rgba(253, 238, 233, 0) 60%),
    radial-gradient(760px 420px at 92% 4%, #f0edfa 0%, rgba(240, 237, 250, 0) 62%),
    radial-gradient(700px 420px at 78% 96%, #eaf3ee 0%, rgba(234, 243, 238, 0) 60%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

/* ============ 顶部导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(1.2) blur(14px);
  background: rgba(251, 247, 244, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
}
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--peach) 0%, var(--lavender) 100%);
  display: grid; place-items: center;
  color: #fff; font-size: 15px;
  box-shadow: var(--shadow-s);
}
.logo small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  margin-top: -4px;
}
.nav-right { margin-left: auto; display: flex; gap: 8px; }

/* 隐私徽章 */
.privacy-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(198, 217, 207, 0.4);
  color: #5f7a6a;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(198, 217, 207, 0.7);
}
.privacy-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7fae90;
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ============ 按钮 ============ */
.btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  transition: all .2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-s); }
.btn-ghost { background: rgba(255,255,255,.7); }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }
.btn-primary {
  background: linear-gradient(120deg, var(--peach) 0%, #e9bfc9 55%, var(--lavender) 100%);
  color: #6a5a58;
  border: none;
  box-shadow: 0 6px 18px rgba(226, 178, 180, 0.4);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(226, 178, 180, 0.5); }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }

/* ============ Hero ============ */
.hero { padding: 34px 0 22px; text-align: center; }
.hero h1 {
  font-size: 27px;
  line-height: 1.45;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #e0a79e, #b3a6cc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  color: var(--ink-2);
  font-size: 13.5px;
  margin: 0 auto;
  max-width: 460px;
}
.hero-tags { display: flex; gap: 7px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.tag-mini {
  font-size: 11.5px; padding: 4px 11px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: var(--r-l);
  padding: 22px;
  box-shadow: var(--shadow-m);
  border: 1px solid rgba(255,255,255,.9);
}
.card + .card { margin-top: 16px; }

.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; margin: 0 0 14px;
}
.sec-title .ico {
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px;
  background: var(--bg-soft);
}
.sec-title span.hint {
  margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--ink-3);
}

/* ============ 上传区 ============ */
.uploader {
  border: 1.5px dashed #e6d4cd;
  background: linear-gradient(180deg, #fffdfc, #fdf5f1);
  border-radius: var(--r-xl);
  padding: 40px 22px;
  text-align: center;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.uploader:hover { border-color: var(--peach-deep); background: #fff; }
.uploader.drag-over { border-color: var(--peach-deep); background: #fff9f7; transform: scale(1.01); }
.uploader .up-icon {
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 22px;
  background: linear-gradient(140deg, #fdeee9, #f3eefb);
  display: grid; place-items: center; font-size: 26px;
}
.uploader h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.uploader p { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.uploader .up-tips {
  display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap;
  font-size: 11px; color: var(--ink-2);
}
.uploader .up-tips i {
  font-style: normal; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1px solid var(--line);
}

/* 预览 */
.preview-box { text-align: center; }
.preview-box img {
  max-height: 300px; margin: 0 auto;
  border-radius: var(--r-l);
  box-shadow: var(--shadow-m);
}
.preview-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ============ 加载态 ============ */
.loading {
  text-align: center; padding: 44px 20px;
}
.loading-orb {
  width: 84px; height: 84px; margin: 0 auto 18px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #f6dedb, #ded7ee, #d6e5db, #f6dedb);
  display: grid; place-items: center;
  animation: spin 3.4s linear infinite;
  position: relative;
}
.loading-orb::after {
  content: ""; position: absolute; inset: 9px;
  border-radius: 50%; background: #fff;
}
.loading-orb span { position: relative; font-size: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 4px; font-weight: 600; }
.loading small { color: var(--ink-3); font-size: 11.5px; }
.bar {
  width: 190px; height: 5px; border-radius: 999px;
  background: #f2e8e3; margin: 16px auto 0; overflow: hidden;
}
.bar i {
  display: block; height: 100%; width: 30%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peach), var(--lavender));
  animation: slide 1.5s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}

/* ============ 鉴定书 ============ */
.report-head {
  background: linear-gradient(150deg, #fff8f5 0%, #fbf6fc 55%, #f6fbf8 100%);
  border: 1px solid #fff;
}
.score-row { display: flex; align-items: center; gap: 22px; }
.score-ring { position: relative; width: 128px; height: 128px; flex: none; }
.score-ring canvas { width: 128px; height: 128px; }
.score-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  flex-direction: column;
}
.score-num b { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.score-num small { display: block; font-size: 10px; color: var(--ink-3); letter-spacing: .16em; text-align: center; margin-top: 3px; }
.score-side { flex: 1; min-width: 0; }
.verdict {
  font-size: 19px; font-weight: 800; margin: 0 0 4px; line-height: 1.4;
}
.verdict-sub { font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.hashtags { display: flex; gap: 6px; flex-wrap: wrap; }
.hashtag {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.9); border: 1px solid var(--line);
  color: #8d7f86; font-weight: 600;
}
.one-line {
  margin-top: 16px; padding: 14px 16px;
  background: rgba(255,255,255,.75);
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.85; color: #5f5551;
}
.one-line b { color: var(--ink); }

/* 雷达 */
.radar-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.radar-wrap canvas { width: 250px; height: 230px; flex: none; }
.dim-list { flex: 1; min-width: 210px; }
.dim-item { margin-bottom: 9px; }
.dim-item .top {
  display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 3px;
}
.dim-item .top b { font-weight: 700; }
.dim-item .top span { color: var(--peach-deep); font-weight: 700; }
.dim-item .track { height: 5px; border-radius: 999px; background: #f4ece8; overflow: hidden; }
.dim-item .track i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f0cfc9, #cfc9e0);
  width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1);
}
.dim-item em { font-style: normal; display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }

/* 特征网格 */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feat-cell {
  background: var(--bg-soft); border-radius: var(--r-m); padding: 12px 14px;
  border: 1px solid var(--line);
}
.feat-cell .k { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; }
.feat-cell .v { font-size: 14px; font-weight: 700; margin-top: 2px; }
.feat-cell .d { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.6; }

/* 季节色板 */
.palette { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sw { text-align: center; }
.sw i {
  display: block; width: 42px; height: 42px; border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.sw span { display: block; font-size: 10px; color: var(--ink-3); margin-top: 4px; }

/* 列表项 */
.nice-list { list-style: none; padding: 0; margin: 0; }
.nice-list li {
  display: flex; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px; line-height: 1.8;
}
.nice-list li:last-child { border-bottom: none; }
.nice-list .n {
  flex: none; width: 22px; height: 22px; border-radius: 8px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: #fdeee9; color: #c98d84; margin-top: 2px;
}
.nice-list.olive .n { background: #eaf3ee; color: #6b9079; }

/* 妆容指南 */
.makeup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mk {
  border-radius: var(--r-m); padding: 13px 14px;
  background: #fff; border: 1px solid var(--line);
}
.mk .h { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.mk .h .e { font-size: 13px; }
.mk p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.75; }

/* Look 卡 */
.looks { display: grid; gap: 10px; }
.look {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px; border-radius: var(--r-m);
  background: var(--bg-soft); border: 1px solid var(--line);
}
.look .lno {
  flex: none; width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: #fff;
}
.look .lbody h4 { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; }
.look .lbody p { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.7; }

/* 分享卡 */
.share-preview {
  border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line);
  background: #f7f2ef; padding: 10px; text-align: center;
}
.share-preview canvas { width: 100%; max-width: 320px; border-radius: 12px; }

/* 隐私声明 */
.privacy-card {
  background: linear-gradient(150deg, #f4f8f5, #fbf7f4);
  border: 1px solid #e8efea;
}
.privacy-card .irow { display: flex; gap: 10px; padding: 9px 0; font-size: 12.5px; line-height: 1.7; }
.privacy-card .irow .ic { flex: none; font-size: 14px; }
.privacy-card .irow b { font-weight: 700; }

/* ============ 弹窗 ============ */
.mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(74, 68, 65, 0.34);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.mask.on { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 100%; max-width: 440px; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: var(--r-xl); padding: 24px;
  box-shadow: var(--shadow-l);
  animation: rise .3s cubic-bezier(.2,.9,.3,1);
}
@keyframes rise { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.modal .msub { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-3); }
.modal .mact { display: flex; gap: 10px; margin-top: 18px; }
.modal .mact .btn { flex: 1; justify-content: center; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.field select, .field input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line-2); background: #fdfaf8;
  font-size: 13px; color: var(--ink); font-family: inherit;
  outline: none; transition: border-color .2s;
}
.field select:focus, .field input:focus { border-color: var(--peach-deep); background: #fff; }
.field .tip { font-size: 11px; color: var(--ink-3); margin-top: 5px; line-height: 1.6; }
.field .tip a { color: #8b7fa8; }

.switch-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 12px; background: var(--bg-soft);
  border: 1px solid var(--line); margin-bottom: 12px;
}
.switch-row .txt { flex: 1; }
.switch-row .txt b { display: block; font-size: 12.5px; }
.switch-row .txt small { font-size: 11px; color: var(--ink-3); }
.sw2 {
  flex: none; width: 42px; height: 24px; border-radius: 999px;
  background: #e7dbd6; position: relative; cursor: pointer; transition: background .2s;
}
.sw2 i {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.sw2.on { background: #c9bfd8; }
.sw2.on i { transform: translateX(18px); }

/* 提示条 */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: rgba(76, 68, 65, .94); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 12.5px;
  z-index: 120; opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  max-width: 88vw; text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 页脚 */
.footer { text-align: center; margin-top: 34px; color: var(--ink-3); font-size: 11.5px; line-height: 2; }
.footer .fl { display: flex; gap: 14px; justify-content: center; margin-bottom: 4px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--peach-deep); }

/* 隐藏 */
.hide { display: none !important; }

/* 结果区入场动画 */
.reveal { animation: rise2 .5s cubic-bezier(.2,.9,.3,1) both; }
@keyframes rise2 { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }

/* 响应式 */
@media (max-width: 640px) {
  .hero h1 { font-size: 23px; }
  .score-row { flex-direction: column; text-align: center; gap: 14px; }
  .score-ring { width: 116px; height: 116px; }
  .score-ring canvas { width: 116px; height: 116px; }
  .score-side { width: 100%; }
  .hashtags { justify-content: center; }
  .feat-grid { grid-template-columns: 1fr; }
  .makeup-grid { grid-template-columns: 1fr; }
  .radar-wrap { justify-content: center; }
  .card { padding: 18px; border-radius: 22px; }
  .uploader { padding: 30px 16px; }
}
