/* 宠物殡葬费用计算器 · 现代产品感单列卡堆叠 · 作用域 .t3-petf（深色仅改变量值） */
.t3-petf {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1f2937;
  --sub: #667085;
  --line: #e4e7ec;
  --acc: var(--a);
  --acc-deep: #5b21b6;
  --soft: rgba(109, 40, 217, .08);
  --flame: #f59e0b;
  --bad: #b91c1c;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 28px -14px rgba(16, 24, 40, .12);
  --ring: 0 0 0 3px rgba(109, 40, 217, .25);
  --btn-fg: #fff;
  --hero-bg: linear-gradient(160deg, #4c1d95, var(--a) 60%, #8b5cf6);
  --hero-ink: #fff;
  --hero-sub: #ede9fe;
  --hero-em: #fde68a;
  --svg-bg: #f5f3ff;
  --svg-soft: #ddd6fe;
  background: var(--bg);
  color: var(--ink);
  padding: 20px 14px 46px;
  line-height: 1.7;
  font-size: 14px;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
[data-theme='dark'] .t3-petf {
  --bg: #0b1220;
  --card: #121a2b;
  --ink: #e6edf7;
  --sub: #9fb0c9;
  --line: rgba(148, 163, 184, .18);
  --acc: #a78bfa;
  --acc-deep: #7c3aed;
  --soft: rgba(167, 139, 250, .14);
  --bad: #f87171;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -14px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(167, 139, 250, .3);
  --btn-fg: #0b1220;
  --hero-bg: linear-gradient(160deg, #131c2e, #1d1633 60%, #2a1a4a);
  --hero-ink: #e6edf7;
  --hero-sub: #c9d4e5;
  --hero-em: #c4b5fd;
  --svg-bg: #1a2338;
  --svg-soft: #2c2450;
}
.t3-petf * { box-sizing: border-box; }
.t3-petf .pf-wrap { max-width: 760px; margin: 0 auto; }

/* hero */
.t3-petf .pf-hero {
  display: flex; gap: 20px; align-items: center; background: var(--hero-bg);
  border-radius: 16px; padding: 26px; color: var(--hero-ink); box-shadow: var(--shadow);
}
.t3-petf .pf-art { flex: 0 0 auto; background: var(--card); border-radius: 50%; width: 132px; height: 116px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.t3-petf .pf-badge { display: inline-block; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 2px 12px; font-size: 12.5px; }
.t3-petf .pf-hero h1 { margin: 8px 0 4px; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.4; font-weight: 800; }
.t3-petf .pf-hero h1 em { display: block; font-style: normal; font-size: clamp(13px, 1.8vw, 16px); color: var(--hero-em); font-weight: 600; }
.t3-petf .pf-sub { margin: 4px 0 0; font-size: 14px; color: var(--hero-sub); }
.t3-petf .pf-sub b { color: var(--hero-em); }
@media (max-width: 900px) {
  .t3-petf .pf-hero { flex-direction: column; text-align: center; }
  .t3-petf .pf-art { max-width: 260px; }
}

/* cards */
.t3-petf .pf-cards { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.t3-petf .pf-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.t3-petf .pf-card:hover { box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 14px 30px -14px rgba(16, 24, 40, .16); }
.t3-petf .pf-card h2 { margin: 0 0 16px; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.t3-petf .pf-ico { font-size: 16px; width: 24px; height: 24px; border-radius: 8px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.t3-petf .pf-h3 { margin: 16px 0 8px; font-size: 14px; color: var(--sub); font-weight: 700; }

/* fields */
.t3-petf .pf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 760px) { .t3-petf .pf-row2 { grid-template-columns: 1fr; } }
.t3-petf .pf-field > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.t3-petf .pf-field > label b { color: var(--acc); }
.t3-petf .pf-hint { margin: 6px 0 0; font-size: 12px; color: var(--sub); line-height: 1.5; }
.t3-petf .pf-ctl { display: flex; }
.t3-petf .pf-ctl input, .t3-petf .pf-ctl select {
  flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px;
  font-size: 15px; background: var(--card); color: var(--ink); font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.t3-petf .pf-ctl input { border-radius: 10px 0 0 10px; }
.t3-petf .pf-ctl input::placeholder { color: var(--sub); opacity: .7; }
.t3-petf .pf-ctl input:focus, .t3-petf .pf-ctl select:focus { outline: none; border-color: var(--acc); box-shadow: var(--ring); position: relative; z-index: 1; }
.t3-petf .pf-ctl i { font-style: normal; display: inline-flex; align-items: center; padding: 0 12px; font-size: 12.5px; background: var(--soft); color: var(--sub); border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; }
.t3-petf .err { margin: 4px 0 0; font-size: 12px; color: var(--bad); }
.t3-petf .pf-field.bad input { border-color: var(--bad); }

/* option rows */
.t3-petf .pf-field { min-width: 0; }
.t3-petf .pf-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: var(--card); transition: .15s; }
.t3-petf .pf-field:last-of-type .pf-opt { margin-bottom: 0; }
.t3-petf .pf-field.bad .pf-opt { border-color: var(--bad); }
.t3-petf .pf-opt:has(input:checked) { border-color: var(--acc); background: var(--soft); }
.t3-petf .pf-check { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0; }
.t3-petf .pf-check input { position: absolute; opacity: 0; pointer-events: none; }
.t3-petf .pf-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); background: var(--card); flex: 0 0 auto; position: relative; transition: .15s; }
.t3-petf .pf-check input:checked + .pf-box { background: var(--acc); border-color: var(--acc); }
.t3-petf .pf-check input:checked + .pf-box::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: 2.5px solid var(--btn-fg); border-top: 0; border-left: 0; transform: rotate(42deg); }
.t3-petf .pf-name { font-size: 14px; font-weight: 700; }
.t3-petf .pf-name small { display: block; font-weight: 400; font-size: 12px; color: var(--sub); }
.t3-petf .pf-ctl-price { width: 132px; flex: 0 0 auto; }
.t3-petf .pf-ctl-price input { font-size: 14px; padding: 0 10px; text-align: right; }
.t3-petf .pf-ctl-price i { padding: 0 8px; font-size: 11.5px; }

/* actions */
.t3-petf .pf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.t3-petf .pf-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; height: 44px; padding: 0 20px; font-size: 14.5px; cursor: pointer; font-family: inherit; transition: .15s; }
.t3-petf .pf-btn:hover { border-color: var(--acc); color: var(--acc); }
.t3-petf .pf-btn-go { flex: 1; background: linear-gradient(135deg, var(--acc), var(--acc-deep)); border: none; color: var(--btn-fg); font-weight: 700; }
.t3-petf .pf-btn-go:hover { filter: brightness(1.08); color: var(--btn-fg); transform: translateY(-1px); }
.t3-petf .pf-btn-ghost { color: var(--sub); }
.t3-petf .pf-msg { margin: 12px 0 0; font-size: 13px; color: var(--sub); background: var(--soft); border-radius: 10px; padding: 8px 12px; }
.t3-petf .pf-msg.bad { color: var(--bad); background: rgba(248, 113, 113, .12); }

/* result */
.t3-petf .pf-big {
  margin: 0 0 16px; text-align: center; background: var(--soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.t3-petf .pf-big span { font-size: 12px; color: var(--sub); letter-spacing: 2px; }
.t3-petf .pf-big b {
  font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--acc), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t3-petf .pf-big em { font-style: normal; font-size: 12px; color: var(--sub); }
.t3-petf .pf-tbwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t3-petf .pf-tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t3-petf .pf-tb th, .t3-petf .pf-tb td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.t3-petf .pf-tb thead th { color: var(--sub); font-size: 12.5px; font-weight: 700; background: var(--soft); }
.t3-petf .pf-tb thead th:first-child { border-radius: 8px 0 0 8px; }
.t3-petf .pf-tb thead th:last-child { border-radius: 0 8px 8px 0; }
.t3-petf .pf-tb td.num, .t3-petf .pf-tb th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t3-petf .pf-tb tfoot td { font-weight: 800; border-bottom: none; background: var(--bg); }
.t3-petf .pf-tb tr.cur td { background: var(--soft); }
@media (max-width: 760px) { .t3-petf .pf-tb { min-width: 440px; } }
.t3-petf .pf-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--sub); }
.t3-petf .pf-steps li { margin-bottom: 5px; }
.t3-petf .pf-steps b { color: var(--ink); }
.t3-petf .pf-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.t3-petf .pf-ops button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 8px 16px; font-size: 13px; cursor: pointer; font-family: inherit; transition: .15s; }
.t3-petf .pf-ops button:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-1px); }

/* 空态引导 */
.t3-petf .pf-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 1px dashed var(--line); box-shadow: none; background: transparent; padding: 30px 20px; }
.t3-petf .pf-empty-ico { font-size: 32px; line-height: 1; }
.t3-petf .pf-empty b { color: var(--ink); font-size: 15px; }
.t3-petf .pf-empty p { margin: 0; font-size: 13px; color: var(--sub); max-width: 420px; }
.t3-petf #pfOut[hidden] ~ .pf-empty { display: flex; }
.t3-petf #pfOut:not([hidden]) ~ .pf-empty { display: none; }

/* soft note */
.t3-petf .pf-soft { margin-top: 16px; background: var(--soft); border-radius: 12px; padding: 14px 16px; }
.t3-petf .pf-soft h3 { margin: 0 0 6px; font-size: 14px; color: var(--acc); }
.t3-petf .pf-soft p { margin: 0; font-size: 13.3px; color: var(--sub); }
.t3-petf .pf-soft b { color: var(--ink); }

/* history */
.t3-petf .pf-hist-head { display: flex; justify-content: space-between; align-items: center; }
.t3-petf .pf-hist-head h2 { margin: 0; }
.t3-petf .pf-hist-head button { border: 1px solid var(--line); background: none; color: var(--sub); border-radius: 8px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; }
.t3-petf .pf-hist-head button:hover { color: var(--bad); border-color: var(--bad); }
.t3-petf .pf-hist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.t3-petf .pf-hist-empty { margin: 0; font-size: 12.8px; color: var(--sub); }
.t3-petf .pf-hitem { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 13.5px; background: var(--bg); transition: .15s; }
.t3-petf .pf-hitem:hover { border-color: var(--acc); transform: translateY(-1px); }
.t3-petf .pf-hitem small { color: var(--sub); font-size: 11.5px; }

@media print {
  .t3-petf .pf-hero, .t3-petf .pf-card:not(.pf-result), .t3-petf .pf-ops, .t3-petf .pf-actions { display: none !important; }
  .t3-petf .pf-card#pfTierCard, .t3-petf .pf-card#pfPlanCard { display: block !important; }
  .t3-petf { background: #fff; padding: 0; }
}
