/* 91茶派 · 91chapai.lol
   tokens 照录自本地保存的 SPA 渲染页（Quasar Framework / Material Design）
   ——主色 #FF3399、搜索按钮 #663366、底栏 Quasar purple-13、加载条 #ef499c、
     底色 bg-grey-1、页头 60px、底栏 padding-left 25px、卡片外距 30/15px。
   只有主色文字、底栏实底、次要文字三处按对比度加深。
   颜色一律走 :root 变量。 */

:root {
  --brand: #AD1457;
  --brand-deep: #8E1B4E;
  --pink: #FF3399;
  --pink-soft: #FDF2F8;
  --pink-line: #F8BBD0;
  --plum: #663366;
  --plum-deep: #4F274F;
  --purple: #7B1FA2;
  --purple-deep: #5E1580;
  --bar: #ef499c;
  --bar-light: #FF7AC0;
  --ink: #333333;
  --ink-2: #444444;
  --muted: #6B6B6B;
  --muted-2: #767676;
  --line: #E0E0E0;
  --line-2: #EEEEEE;
  --line-3: #F0F0F0;
  --surface: #FFFFFF;
  --bg: #F5F5F5;
  --bg-2: #FAFAFA;
  --elev-1: 0 1px 2px rgba(0, 0, 0, .07), 0 1px 1px rgba(0, 0, 0, .05);
  --elev-2: 0 2px 4px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .06);
  --elev-3: 0 4px 10px rgba(0, 0, 0, .1), 0 2px 5px rgba(0, 0, 0, .06);
  --elev-brand: 0 4px 12px rgba(173, 20, 87, .18);
  --tint-1: rgba(255, 51, 153, .34);
  --tint-1-0: rgba(255, 51, 153, 0);
  --tint-2: rgba(102, 51, 102, .30);
  --tint-2-0: rgba(102, 51, 102, 0);
  --shade-1: rgba(0, 0, 0, .06);
  --shade-2: rgba(0, 0, 0, .22);
  --shade-3: rgba(0, 0, 0, .45);
  --edge: rgba(255, 255, 255, .5);
  --shadow-cta: 0 8px 22px rgba(102, 51, 102, .34), 0 2px 6px rgba(0, 0, 0, .12);
  --shadow-drawer: -10px 0 26px rgba(0, 0, 0, .16);
  --r-card: 8px;
  --r-btn: 8px;
  --r-chip: 999px;
  --r-sm: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Noto Sans", "Microsoft YaHei", Arial, sans-serif;
  --wp: 1200px;
  --head-h: 60px;
  --nav-h: 46px;
  --cta-space: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-bottom: calc(var(--cta-space) + 10px);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
h1 { font-size: 24px; font-weight: 500; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0; overflow-wrap: anywhere; }
ul, ol { margin: 0; padding-left: 1.3em; }
li { overflow-wrap: anywhere; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wp { width: 100%; max-width: var(--wp); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--brand); color: var(--surface); padding: 10px 16px; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.narrow { max-width: 880px; }
.note { font-size: 13px; color: var(--muted); }
.body-p { margin-bottom: 9px; color: var(--ink-2); }
.mt-s { margin-top: 8px; }
.ctr { text-align: center; }
.svg-ico { width: 1em; height: 1em; vertical-align: -0.14em; }

/* ---------- 加载条（源站 q-loading-bar 用的那条品红） ---------- */
.route-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; background: linear-gradient(90deg, var(--bar), var(--bar-light), var(--bar)); background-size: 200% 100%; animation: route-run .9s ease-in-out infinite; }
@keyframes route-run { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- 顶栏（源站 q-header.fixed-top.bg-white.text-grey-8.q-py-xs，容器 q-mx-auto） ---------- */
.q-header { position: sticky; top: 0; z-index: 60; background: var(--surface); color: var(--muted-2); }
.q-header .row { width: 100%; max-width: var(--wp); margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 10px; min-height: var(--head-h); }
.burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: 50%; flex: none; }
.burger:hover { background: var(--bg); }
.burger svg { width: 26px; height: 26px; }
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo-text { font-size: 22px; font-weight: 600; color: var(--brand); letter-spacing: .5px; line-height: 1; }
.q-space { flex: 1 1 auto; }
.search-btn { flex: none; width: 40px; height: 36px; border: 0; border-radius: var(--r-sm); background: var(--plum); color: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.search-btn:hover { background: var(--plum-deep); }
.search-wrap { flex: 1 1 auto; min-width: 0; }
.search-form { position: relative; display: flex; align-items: center; gap: 6px; }
.search-input { flex: 1 1 auto; width: 100%; min-width: 0; height: 36px; padding: 0 12px; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.search-input::placeholder { color: var(--muted-2); }
.search-input:focus { outline: none; border-color: var(--brand); }
.header-right { display: flex; align-items: center; gap: 15px; flex: 0 0 auto; font-size: 15px; }
.header-right a { color: var(--ink); }
.header-right a:hover { color: var(--brand); }

/* 搜索结果面板 */
.search-out { position: absolute; left: 0; right: 0; top: 40px; z-index: 70; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--elev-3); overflow: hidden; }
.search-out a { display: block; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.search-out a:last-child { border-bottom: 0; }
.search-out a:hover { background: var(--pink-soft); }
.search-out b { display: block; font-size: 14px; color: var(--brand); }
.search-out span { font-size: 12px; color: var(--muted); }
.search-out .none { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ---------- 五项导航条（源站是 q-footer.fixed-bottom.bg-purple-13，本站改到顶栏下第二行） ---------- */
.q-navbar { position: sticky; top: var(--head-h); z-index: 55; background: var(--purple); }
.q-navbar ul { width: 100%; max-width: var(--wp); margin: 0 auto; padding: 0 16px; display: flex; align-items: stretch; gap: 0; list-style: none; overflow-x: auto; }
.q-navbar li { flex: 1 1 0; min-width: 0; }
.q-navbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--nav-h); padding: 5px 6px; color: var(--surface); font-size: 13px; }
.q-navbar a:hover { background: var(--purple-deep); color: var(--surface); }
.q-navbar a[aria-current="page"] { background: var(--purple-deep); color: var(--surface); font-weight: 700; }
.q-navbar .av { width: 22px; height: 22px; }
.q-navbar .av svg { width: 100%; height: 100%; }

/* ---------- 卡片（源站 q-card.my-card ＋ q-pa-md ＋ q-gutter-md） ---------- */
.q-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--elev-2); margin: 0 0 15px; }
.q-card:first-of-type { margin-top: 15px; }
.q-pa-md { padding: 16px; }
.q-card .q-pa-md { padding: 16px; }
.q-gutter > * + * { margin-top: 12px; }

.head-card { padding: 18px 16px; }
.head-card h1 { color: var(--brand); font-size: 22px; }
.head-card .lead { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---------- 八个人口项（源站入口项 ＋ 30px 图标 ＋ 标签文字） ---------- */
.a-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.a-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: var(--r-card); color: var(--ink); text-align: center; }
.a-item:hover { background: var(--pink-soft); color: var(--brand); }
.a-item .ic { width: 30px; height: 30px; color: var(--brand); flex: none; transition: transform .25s; }
.a-item:hover .ic { transform: translateY(-2px); }
.a-item .ic svg { width: 100%; height: 100%; }
.a-item .Label { font-size: 14px; }

/* ---------- 城市行（源站 .city-box ＋ ul.city-ul ＋ 圆角描边按钮） ---------- */
.city-box { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.city-box > b { flex: none; font-weight: 700; white-space: nowrap; color: var(--ink); padding-top: 4px; }
.city-ul { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; flex: 1 1 240px; min-width: 0; }
.city-ul a { display: inline-block; padding: 3px 10px; font-size: 15px; color: var(--ink); border-radius: var(--r-sm); }
.city-ul a:hover { background: var(--pink-soft); color: var(--brand); }
.city-more { display: flex; justify-content: center; margin-top: 12px; }
.outline-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 18px; border: 1px solid var(--brand); border-radius: var(--r-chip); background: transparent; color: var(--brand); font-size: 14px; cursor: pointer; }
.outline-btn:hover { background: var(--pink-soft); }

/* ---------- 分段控件（源站有 QTabs） ---------- */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-btn); min-height: 32px; padding: 0 13px; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--brand); background: var(--pink-soft); color: var(--brand); font-weight: 700; }

/* ---------- 正文块 ---------- */
.band-body > p:last-child, .band-body > ul:last-child, .band-body > ol:last-child, .band-body > dl:last-child { margin-bottom: 0; }
.callout { background: var(--pink-soft); border: 1px solid var(--pink-line); border-radius: var(--r-card); padding: 11px 13px; margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.steps { counter-reset: step; display: grid; gap: 8px; padding: 0; list-style: none; margin: 10px 0; }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 11px 13px 11px 44px; font-size: 14px; color: var(--ink-2); }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.steps li b { display: block; color: var(--ink); }

.rule { border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 8px; background: var(--surface); }
.rule:last-child { margin-bottom: 0; }
.rule h3 { display: flex; gap: 7px; font-size: 15px; line-height: 1.55; }
.rule p { margin-top: 5px; font-size: 14px; color: var(--ink-2); }
.rule-n { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--brand); color: var(--surface); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 11px 14px; margin-bottom: 8px; }
details.faq summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "\25BE"; color: var(--brand); flex: none; }
details.faq[open] summary::after { content: "\25B4"; }
details.faq p { margin-top: 7px; font-size: 14px; color: var(--ink-2); }
details.faq p + p { margin-top: 5px; }

.jump { display: grid; gap: 8px; }
.jump a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 11px 13px; }
.jump a:hover { border-color: var(--pink); box-shadow: var(--elev-brand); }
.jump b { display: block; font-size: 15px; color: var(--brand); }
.jump span { font-size: 13px; color: var(--muted); }

.terms { display: grid; gap: 0; margin: 0; }
.terms div { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.terms div:last-child { border-bottom: 0; }
.terms dt { flex: none; width: 104px; font-weight: 700; color: var(--brand); }
.terms dd { margin: 0; color: var(--ink-2); }
.termfilter { width: 100%; max-width: 340px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-btn); font-size: 14px; margin-bottom: 10px; background: var(--surface); color: var(--ink); }

/* 表格 */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--surface); }
table.tbl caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 13px; color: var(--muted); }
table.tbl th, table.tbl td { padding: 9px 11px; text-align: left; vertical-align: top; font-size: 14px; border-bottom: 1px solid var(--line-2); }
table.tbl thead th { background: var(--pink-soft); color: var(--brand); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--pink-line); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td:first-child { font-weight: 700; color: var(--brand); white-space: nowrap; }

/* ---------- 页脚 ---------- */
.ofooter { background: var(--surface); border-top: 1px solid var(--line); margin-top: 15px; }
.ofooter .in { width: 100%; max-width: var(--wp); margin: 0 auto; padding: 16px 16px 20px; }
.ft-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ft-brand a { font-size: 19px; font-weight: 600; color: var(--brand); letter-spacing: .5px; }
.ft-cols { display: grid; gap: 12px; margin-bottom: 10px; }
.ft-col h2 { font-size: 13px; color: var(--muted); font-weight: 400; margin-bottom: 3px; }
.ft-col a { display: block; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.ft-col a:hover { color: var(--brand); }
.ft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 9px; }
.ft-bar .dot { color: var(--line); }
.ft-note { font-size: 13px; color: var(--ink-2); margin-top: 7px; }
.ft-copy { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- 返回顶部 ---------- */
.to-top { position: fixed; right: 14px; bottom: calc(var(--cta-space) + 10px); z-index: 70; width: 40px; height: 40px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--brand); cursor: pointer; box-shadow: var(--elev-2); }
.to-top:hover { box-shadow: var(--elev-3); color: var(--brand-deep); }

/* ---------- 唯一寻芳 CTA ---------- */
.site-cta {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; justify-content: center;
  width: min(500px, calc(100% - 32px)); min-height: 56px; padding: 0 22px;
  border-radius: var(--r-card); background: var(--plum); color: var(--surface);
  font-size: 17px; font-weight: 600; text-align: center;
  box-shadow: var(--shadow-cta); overflow: hidden; transition: background-color .25s;
}
.site-cta:hover, .site-cta:focus-visible, .site-cta:active { background: var(--plum-deep); color: var(--surface); }
.site-cta .cta-text { position: relative; z-index: 2; }
.site-cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(96% 120% at 50% 122%, var(--tint-1) 0%, var(--tint-1-0) 68%),
    radial-gradient(88% 116% at 12% 8%, var(--tint-2) 0%, var(--tint-2-0) 66%);
  opacity: 0; transform: scale(1);
  animation: cta-bloom 3.2s cubic-bezier(.22, .68, .3, 1) infinite;
  z-index: 0; pointer-events: none;
}
.site-cta::after {
  content: ""; position: absolute; left: 0; top: 0; width: 34%; height: 2px;
  background: var(--bar-light);
  transform: translateX(-40%); opacity: 0;
  animation: cta-bar 3.2s cubic-bezier(.22, .68, .3, 1) infinite;
  z-index: 1; pointer-events: none;
}
@keyframes cta-bloom {
  0%, 56% { opacity: 0; transform: scale(1); }
  70% { opacity: 1; transform: scale(1.04); }
  88%, 100% { opacity: 0; transform: scale(1.08); }
}
@keyframes cta-bar {
  0%, 58% { opacity: 0; transform: translateX(-40%); }
  66% { opacity: 1; }
  84% { transform: translateX(196%); }
  92%, 100% { opacity: 0; transform: translateX(196%); }
}

/* ---------- 抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; z-index: 90; background: var(--shade-3); }
.drawer-panel { position: fixed; top: 0; left: 0; bottom: 0; z-index: 91; width: min(86vw, 340px); padding: 12px 14px 26px; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); box-shadow: var(--shadow-drawer); animation: drawer-in .3s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; align-items: center; margin-bottom: 10px; }
.drawer-head span { font-size: 18px; font-weight: 600; color: var(--brand); }
.drawer-x { margin-left: auto; width: 34px; height: 32px; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.drawer-srch { position: relative; margin-bottom: 10px; }
.drawer-srch input { width: 100%; height: 36px; padding: 0 12px; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--surface); color: var(--ink); }
.drawer-group { margin-bottom: 10px; }
.drawer-group h2 { font-size: 12px; color: var(--muted); font-weight: 400; margin-bottom: 3px; padding-left: 8px; }
.drawer-group a { display: flex; align-items: center; min-height: 42px; padding: 0 8px; font-size: 15px; color: var(--ink-2); border-radius: var(--r-btn); }
.drawer-group a:hover { background: var(--pink-soft); color: var(--brand); }

/* ---------- 断点 ---------- */
@media (min-width: 640px) {
  .ft-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jump { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-navbar a { flex-direction: row; gap: 6px; font-size: 14px; }
  .q-navbar .av { width: 18px; height: 18px; }
}
@media (min-width: 900px) {
  .ft-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .jump { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-grid { gap: 8px; }
  .a-item .Label { font-size: 15px; }
}
@media (max-width: 767px) {
  .q-header .row { flex-wrap: wrap; gap: 8px 10px; padding-top: 8px; padding-bottom: 8px; min-height: 0; }
  .q-header { position: static; }
  .q-navbar { position: static; top: auto; }
  .logo-text { font-size: 19px; }
  .a-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .q-pa-md, .q-card .q-pa-md { padding: 14px 12px; }
  .wp, .q-header .row, .q-navbar ul, .ofooter .in { padding-left: 12px; padding-right: 12px; }
  .terms div { display: block; }
  .terms dt { width: auto; display: block; }
  .header-right { font-size: 14px; gap: 12px; }
  .search-wrap { flex: 1 1 100%; order: 3; }
  .site-cta {
    left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: none; width: auto; font-size: 14px; min-height: 56px;
  }
}
@media (max-width: 419px) {
  .a-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .site-cta::before { animation: none; opacity: .16; transform: scale(1); }
  .site-cta::after { animation: none; opacity: .9; transform: translateX(196%); }
  .drawer-panel, .route-bar { animation: none; }
  .a-item:hover .ic { transform: none; }
}
