/* ============================================================
   家装材料用量工具站 · 全站统一样式
   适用：首页（卡片导航）+ 9 款材料计算器页面
   ============================================================ */

:root {
    --primary: #4a90d9;
    --primary-deep: #357abd;
    --accent: #6366f1;
    --success: #34c98e;
    --text-main: #1a2233;
    --text-sub: #5b6472;
    --text-light: #8a93a3;
    --border: #e8edf4;
    --bg: #f4f7fb;
    --radius: 16px;
    --shadow-card: 0 4px 20px rgba(30, 58, 95, 0.06);
    --shadow-hover: 0 20px 40px rgba(47, 107, 191, 0.15);
    --shadow-glow: 0 0 30px rgba(74, 144, 217, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection { background: rgba(74, 144, 217, 0.18); }

/* ---------- 页面加载动画 ---------- */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
    z-index: 1000;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(74, 144, 217, 0.4);
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}
.container-wide { max-width: 1100px; }

/* ================= 顶部 Hero ================= */
header {
    text-align: center;
    padding: 60px 20px 48px;
    background: linear-gradient(160deg, #eaf2fd 0%, #f4f7fb 45%, #eafaf3 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
header::before,
header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: blobFloat 10s ease-in-out infinite;
}
header::before {
    width: 340px;
    height: 340px;
    background: rgba(74, 144, 217, 0.16);
    top: -120px;
    left: -80px;
}
header::after {
    width: 280px;
    height: 280px;
    background: rgba(99, 102, 241, 0.12);
    bottom: -120px;
    right: -60px;
    animation-delay: -5s;
}
/* 额外装饰光斑 */
.hero-deco {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    animation: blobFloat 12s ease-in-out infinite;
}
.hero-deco-1 {
    width: 200px;
    height: 200px;
    background: rgba(52, 201, 142, 0.10);
    top: 20%;
    right: 15%;
    animation-delay: -3s;
}
.hero-deco-2 {
    width: 160px;
    height: 160px;
    background: rgba(245, 166, 35, 0.08);
    bottom: 10%;
    left: 20%;
    animation-delay: -7s;
}
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -15px) scale(1.06); }
    66% { transform: translate(-15px, 20px) scale(0.95); }
    50% { transform: translate(20px, 15px) scale(1.08); }
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-deep);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(74, 144, 217, 0.28);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(74, 144, 217, 0.10);
    position: relative;
    z-index: 1;
    animation: fadeUp 0.5s ease backwards;
}
.hero-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(52, 201, 142, 0.18);
    animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(52, 201, 142, 0.18); }
    50% { box-shadow: 0 0 0 6px rgba(52, 201, 142, 0.08); }
}
header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    background: linear-gradient(92deg, #1e3a5f 10%, #2f6bbf 35%, #6366f1 55%, #4a90d9 80%, #1e3a5f 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #2f6bbf;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.55s ease 0.1s backwards, gradientShift 6s ease-in-out infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}
.hero-sub,
.intro {
    color: var(--text-sub);
    font-size: 15px;
    max-width: 740px;
    margin: 12px auto 0;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.55s ease 0.15s backwards;
}
.hero-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.55s ease 0.2s backwards;
}
.hero-chips span {
    font-size: 13px;
    color: var(--text-sub);
    background: #fff;
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.05);
    transition: transform 0.3s var(--transition-spring), box-shadow 0.3s ease, border-color 0.3s ease;
}
.hero-chips span:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.1);
    border-color: rgba(74, 144, 217, 0.3);
}
.hero-chips b { color: var(--primary-deep); font-weight: 700; }

/* 返回首页胶囊按钮 */
.back-home {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 9px 16px 9px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 4px 14px rgba(74, 144, 217, 0.35);
    transition: all 0.3s var(--transition-spring);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.back-home:hover {
    color: #fff;
    filter: brightness(1.1);
    box-shadow: 0 8px 24px rgba(53, 122, 189, 0.5);
    transform: translateY(-50%) scale(1.05);
}
.back-home:active { transform: translateY(-50%) scale(0.95); }

/* ================= 区块标题（首页） ================= */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 700;
    color: var(--text-main);
    margin: 48px 0 6px;
}
.section-title::before {
    content: '';
    flex: none;
    width: 5px;
    height: 24px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    animation: barGrow 0.6s var(--transition-spring) backwards;
}
@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}
.section-sub {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 22px;
    padding-left: 17px;
}

/* ================= 工具卡片（首页导航） ================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    display: block;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 26px 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s var(--transition-spring), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transform-style: preserve-3d;
    will-change: transform;
}
/* 卡片顶部高亮线 */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--transition-smooth);
    z-index: 2;
}
/* 卡片光晕扫过效果 */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 1;
}
.card:hover {
    border-color: rgba(74, 144, 217, 0.5);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    transform: translateY(-8px);
}
.card:hover::before { transform: scaleX(1); }
.card:hover::after { left: 150%; }
.card:active { transform: scale(0.97) translateY(-2px); transition: transform 0.1s ease; }
.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 6px 16px var(--icon-shadow, rgba(74, 144, 217, 0.3));
    transition: transform 0.4s var(--transition-spring), box-shadow 0.4s ease;
    position: relative;
    z-index: 2;
}
/* 图标内部光泽 */
.card-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    pointer-events: none;
}
.card:hover .card-icon {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 8px 24px var(--icon-shadow, rgba(74, 144, 217, 0.45));
}
/* 每款工具专属配色 */
.ic-cizhuan    { background: linear-gradient(135deg, #4a90d9, #2f6bbf); --icon-shadow: rgba(47,107,191,.32); }
.ic-rujiaoyi   { background: linear-gradient(135deg, #34c98e, #1ea06e); --icon-shadow: rgba(30,160,110,.32); }
.ic-shuinisha  { background: linear-gradient(135deg, #f5a623, #e07b00); --icon-shadow: rgba(224,123,0,.30); }
.ic-diban      { background: linear-gradient(135deg, #d98a4a, #b96426); --icon-shadow: rgba(185,100,38,.32); }
.ic-bizhi      { background: linear-gradient(135deg, #ec6bb4, #d43f8f); --icon-shadow: rgba(212,63,143,.30); }
.ic-fangshui   { background: linear-gradient(135deg, #38b6e0, #1f8fc0); --icon-shadow: rgba(31,143,192,.32); }
.ic-tijiaoxian { background: linear-gradient(135deg, #8b6fe8, #6a48d7); --icon-shadow: rgba(106,72,215,.32); }
.ic-geqiang    { background: linear-gradient(135deg, #64748b, #475569); --icon-shadow: rgba(71,85,105,.32); }
.ic-zhuanqiang { background: linear-gradient(135deg, #e05d5d, #c03a3a); --icon-shadow: rgba(192,58,58,.30); }
.ic-lvkouban  { background: linear-gradient(135deg, #9aa7b5, #6b7785); --icon-shadow: rgba(107,119,133,.32); }
.card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}
.card-title::after {
    content: '→';
    font-size: 15px;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s var(--transition-spring);
}
.card:hover .card-title { color: var(--primary-deep); }
.card:hover .card-title::after { opacity: 1; transform: translateX(0); }
.sub-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 16px 0 8px;
}
.card-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.65;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}
.card:hover .card-desc { color: var(--text-sub); }

/* ================= 区块标题 ================= */
section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}
section h2::before {
    content: '';
    flex: none;
    width: 5px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

/* 工具亮点双列列表 */
.tool-points {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin: 6px 0 14px;
}
.tool-points li {
    position: relative;
    padding: 13px 14px 13px 20px;
    background: #f8fafd;
    border: 1px solid #eef2f8;
    border-radius: 12px;
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.8;
    transition: all 0.3s var(--transition-spring);
}
.tool-points li:hover {
    border-color: rgba(74, 144, 217, 0.4);
    box-shadow: 0 8px 20px rgba(47, 107, 191, 0.12);
    transform: translateY(-3px);
    background: #fff;
}
.tool-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.tool-points li b { color: var(--text-main); font-weight: 700; }

.closing-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #eef4fd, #f2effe);
    border: 1px solid #e3ecfa;
    border-radius: 10px;
    padding: 13px 16px;
    color: var(--primary-deep);
    font-size: 14.5px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.closing-note:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(74, 144, 217, 0.12);
}

/* ================= 计算器页面区块 ================= */
section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 28px 30px;
    margin-top: 20px;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s var(--transition-spring);
}
section:hover {
    border-color: rgba(74, 144, 217, 0.25);
    box-shadow: 0 8px 30px rgba(30, 58, 95, 0.09);
}
h3 {
    font-size: 16px;
    color: var(--text-main);
    margin: 16px 0 6px;
    font-weight: 600;
}
p { color: var(--text-sub); margin-bottom: 10px; font-size: 15px; }
section p b { color: var(--primary-deep); font-weight: 700; }

/* ---------- 表单 ---------- */
.calc-form { display: grid; gap: 14px; }
.form-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 12px;
}
.form-row label {
    font-size: 14px;
    color: #444;
    font-weight: 500;
    transition: color 0.2s ease;
}
.form-row:focus-within label {
    color: var(--primary-deep);
}
.form-row input,
.form-row select {
    padding: 11px 14px;
    border: 1.5px solid #d8dee6;
    border-radius: 10px;
    font-size: 14px;
    width: 100%;
    background: #fff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.form-row select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%234a90d9' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 34px;
    cursor: pointer;
}
.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12), 0 2px 8px rgba(74, 144, 217, 0.1);
    transform: translateY(-1px);
}
.form-row input::placeholder { color: #b4bdc9; }

.btn-row { margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition-spring);
    position: relative;
    overflow: hidden;
}
/* 按钮悬停光泽扫过 */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    box-shadow: 0 4px 14px rgba(74, 144, 217, 0.35);
}
.btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 24px rgba(53, 122, 189, 0.45);
    transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-reset {
    background: #f5f6f8;
    border: 1.5px solid #e2e6ec;
    color: #666;
}
.btn-reset:hover { background: #eceff3; border-color: #d5dbe5; transform: translateY(-1px); }
.btn-reset:active { transform: scale(0.97); }

.note {
    font-size: 12.5px;
    color: #6b7c91;
    padding: 9px 12px;
    border-left: 3px solid #dbe8f7;
    background: #f8fbff;
    border-radius: 0 6px 6px 0;
    line-height: 1.6;
    margin-top: 12px;
}

/* ---------- 计算结果 ---------- */
.result {
    margin-top: 20px;
    padding: 20px 22px;
    background: linear-gradient(180deg, #f8fbff, #f3f8fe);
    border: 1px solid #dbe8f7;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
/* 结果区顶部渐变线 */
.result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
    opacity: 0.6;
}
.result h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-deep);
    display: flex;
    align-items: center;
    gap: 8px;
}
.result h3::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(52, 201, 142, 0.18);
    animation: dotPulse 1.8s ease-in-out infinite;
}
.result ul { list-style: none; }
.result li {
    padding: 9px 0;
    font-size: 14px;
    color: var(--text-sub);
    border-bottom: 1px dashed #e3ebf5;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    transition: background 0.2s ease;
    border-radius: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
}
.result li:hover { background: rgba(74, 144, 217, 0.04); }
.result li:last-child { border-bottom: none; }
.result li span:last-child {
    font-weight: 700;
    color: var(--text-main);
    font-size: 15px;
    text-align: right;
    display: inline-block;
}

/* ---------- 相关工具链接 ---------- */
.links-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.links-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fbff;
    border: 1px solid #dbe8f7;
    border-radius: 10px;
    color: var(--primary-deep);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s var(--transition-spring);
    position: relative;
    overflow: hidden;
}
.links-list li a::before {
    content: '';
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.4;
    transition: opacity 0.3s ease, transform 0.3s var(--transition-spring);
}
.links-list li a:hover {
    background: linear-gradient(135deg, #eef4fb, #f0f6ff);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(47, 107, 191, 0.14);
}
.links-list li a:hover::before { opacity: 1; transform: scale(1.5); }
.links-list li a::after { content: '→'; margin-left: auto; opacity: 0; transform: translateX(-8px); transition: opacity 0.3s ease, transform 0.3s var(--transition-spring); }
.links-list li a:hover::after { opacity: 1; transform: translateX(0); }

/* ================= FAQ 手风琴（全站通用） ================= */
.faq-item { border-bottom: 1px solid #eef0f4; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
    padding: 14px 0;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}
.faq-item .faq-a > p {
    margin: 0 0 12px;
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.85;
}
.faq-item .faq-a > p b { color: var(--primary-deep); font-weight: 700; }

/* ================= 免责声明 ================= */
.disclaimer {
    background: #fffaf0;
    border: 1px solid #f0e3c2;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 24px;
    color: #8a6d2f;
    font-size: 13px;
    line-height: 1.8;
    box-shadow: none;
}
.disclaimer:hover {
    border-color: #f0e3c2;
    box-shadow: none;
}
.disclaimer h2 {
    font-size: 15px;
    color: #a07c22;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
}
.disclaimer h2::before {
    content: '⚠';
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    font-size: 15px;
}
.disclaimer p { color: #8a6d2f; font-size: 13px; margin-bottom: 0; }

/* ================= 页脚 ================= */
footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 60px;
    background: linear-gradient(180deg, #1e2937, #1a2530);
    color: #9aa8b8;
    font-size: 13px;
    line-height: 1.8;
    position: relative;
    overflow: hidden;
}
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    opacity: 0.5;
}
footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
footer a:hover { color: #6db1f5; }
.footer-brand {
    color: #d7e1ec;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}
.footer-beian {
    display: inline-block;
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

/* ================= 回到顶部 ================= */
#backTop {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.4s var(--transition-spring), box-shadow 0.3s ease;
    box-shadow: 0 6px 20px rgba(74, 144, 217, 0.4);
    z-index: 99;
}
#backTop.show { opacity: 1; visibility: visible; animation: fadeUp 0.4s ease; }
#backTop:hover { transform: translateY(-6px) scale(1.08); box-shadow: 0 14px 30px rgba(74, 144, 217, 0.55); }
#backTop:active { transform: scale(0.9); }

/* ================= 入场动画（纯 CSS，无 JS 依赖；backwards 填充保证延迟期间隐藏，
   动画结束后回归常规样式，不影响 hover 位移） ================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.card,
.tool-points li {
    animation: fadeUp 0.55s cubic-bezier(.22,.61,.36,1) backwards;
}
/* 计算器页面 section 淡入上移 */
main.container > section {
    animation: fadeUp 0.5s cubic-bezier(.22,.61,.36,1) backwards;
}
main.container > section:nth-child(1) { animation-delay: 0.02s; }
main.container > section:nth-child(2) { animation-delay: 0.08s; }
main.container > section:nth-child(3) { animation-delay: 0.14s; }
main.container > section:nth-child(4) { animation-delay: 0.20s; }
main.container > section:nth-child(5) { animation-delay: 0.26s; }
main.container > section:nth-child(6) { animation-delay: 0.32s; }
/* 首页标题淡入 */
.section-title, .section-sub {
    animation: fadeUp 0.5s ease backwards;
}
/* 链接列表逐项淡入 */
.links-list li {
    animation: fadeUp 0.4s ease backwards;
}
.links-list li:nth-child(1) { animation-delay: 0.05s; }
.links-list li:nth-child(2) { animation-delay: 0.10s; }
.links-list li:nth-child(3) { animation-delay: 0.15s; }
.links-list li:nth-child(4) { animation-delay: 0.20s; }
.links-list li:nth-child(5) { animation-delay: 0.25s; }
.links-list li:nth-child(6) { animation-delay: 0.30s; }
.links-list li:nth-child(7) { animation-delay: 0.35s; }
.links-list li:nth-child(8) { animation-delay: 0.40s; }
.links-list li:nth-child(n+9) { animation-delay: 0.45s; }

.tools-grid .card:nth-child(1),  .tool-points li:nth-child(1) { animation-delay: 0.03s; }
.tools-grid .card:nth-child(2),  .tool-points li:nth-child(2) { animation-delay: 0.07s; }
.tools-grid .card:nth-child(3),  .tool-points li:nth-child(3) { animation-delay: 0.11s; }
.tools-grid .card:nth-child(4),  .tool-points li:nth-child(4) { animation-delay: 0.15s; }
.tools-grid .card:nth-child(5),  .tool-points li:nth-child(5) { animation-delay: 0.19s; }
.tools-grid .card:nth-child(6),  .tool-points li:nth-child(6) { animation-delay: 0.23s; }
.tools-grid .card:nth-child(7),  .tool-points li:nth-child(7) { animation-delay: 0.27s; }
.tools-grid .card:nth-child(8),  .tool-points li:nth-child(8) { animation-delay: 0.31s; }
.tools-grid .card:nth-child(9),  .tool-points li:nth-child(9) { animation-delay: 0.35s; }
.tools-grid .card:nth-child(10), .tool-points li:nth-child(10) { animation-delay: 0.39s; }
.tools-grid .card:nth-child(11), .tool-points li:nth-child(11) { animation-delay: 0.43s; }
.tools-grid .card:nth-child(12), .tool-points li:nth-child(12) { animation-delay: 0.47s; }
.tools-grid .card:nth-child(n+13), .tool-points li:nth-child(n+13) { animation-delay: 0.51s; }

/* ================= 攻略文章页 ================= */
.crumb {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 18px;
    text-align: center;
}
.crumb a { color: var(--primary-deep); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.table-wrap {
    overflow-x: auto;
    margin: 14px 0 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eef2f8;
    color: var(--text-sub);
    line-height: 1.6;
}
.data-table th {
    background: #f4f8fd;
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
}
.data-table td b { color: var(--primary-deep); font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fafcff; }

/* 首页攻略卡片图标配色 */
.ic-gonglue { background: linear-gradient(135deg, #2fb8a6, #1a8f80); --icon-shadow: rgba(26, 143, 128, 0.30); }

/* ================= 移动端适配 ================= */
@media (max-width: 820px) {
    header { padding: 48px 16px 38px; }
    header h1 { font-size: 23px; }
    .hero-sub, .intro { font-size: 14px; }
    .hero-chips span { font-size: 12px; padding: 6px 12px; }
    .container { padding: 16px; }
    section { padding: 20px 18px; margin-top: 14px; }
    h3 { font-size: 15px; }
    p { font-size: 14px; }
    .links-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section-title { font-size: 18px; margin-top: 34px; }
    .section-sub { padding-left: 16px; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card { padding: 16px 14px; }
    .card-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 18px;
        margin-bottom: 12px;
    }
    .card-title { font-size: 15px; line-height: 1.35; margin-bottom: 6px; }
    .card-desc { font-size: 12px; line-height: 1.55; }
    .card-title::after { display: none; }
    section h2 { font-size: 17px; }
    .tool-points { grid-template-columns: 1fr; gap: 10px; }
    .tool-points li { font-size: 13.5px; padding: 11px 12px 11px 16px; }
    .closing-note { font-size: 13.5px; padding: 12px 14px; }
    .disclaimer { padding: 16px; font-size: 12.5px; }
    footer { margin-top: 40px; }
}

@media (max-width: 640px) {
    header { padding: 46px 14px 30px; }
    header h1 { font-size: 20px; }
    .container { padding: 12px; }
    section { padding: 18px 14px; border-radius: 12px; }
    section h2 { font-size: 16.5px; margin-bottom: 12px; gap: 9px; }
    /* 表单单列：标签在上、输入框在下 */
    .form-row { grid-template-columns: 1fr; gap: 6px; }
    .form-row label { font-size: 13px; color: #555; }
    /* 16px 字号防 iOS 聚焦自动放大，高度 ≥44px 满足触控 */
    .form-row input,
    .form-row select {
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
    }
    .btn-row { flex-direction: column; gap: 10px; }
    .btn { width: 100%; padding: 12px 22px; font-size: 16px; min-height: 44px; }
    .result { padding: 14px 16px; }
    .result li {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 0;
        font-size: 13px;
    }
    .result li span:last-child { font-size: 15.5px; line-height: 1.4; text-align: left; word-break: break-all; }
    .faq-item h3 { padding: 14px 0; font-size: 14.5px; line-height: 1.5; }
    .faq-item .faq-a > p { font-size: 13.5px; }
    .data-table th, .data-table td { padding: 8px 10px; font-size: 13px; }
    .crumb { margin-top: 14px; font-size: 12.5px; }
    #backTop {
        right: 14px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    footer { padding: 20px 16px; font-size: 12px; }
    /* 返回首页按钮移到 header 左上角，避免与标题重叠 */
    .back-home {
        top: 8px;
        left: 10px;
        transform: none;
        font-size: 13px;
        padding: 7px 12px 7px 10px;
    }
    .back-home:active { transform: scale(0.97); }
}

@media (max-width: 400px) {
    header h1 { font-size: 18.5px; }
    .hero-chips { gap: 8px; }
    .container { padding: 10px; }
    section { padding: 16px 12px; }
}

@media (max-width: 360px) {
    .btn { font-size: 15px; padding: 11px 18px; min-height: 42px; }
    .form-row input, .form-row select { font-size: 15.5px; min-height: 42px; }
    .result li span:last-child { font-size: 14.5px; }
    /* 超窄屏两列卡片再收紧一档，保证标题/描述不溢出 */
    .tools-grid { gap: 10px; }
    .card { padding: 14px 12px; }
    .card-icon { width: 36px; height: 36px; font-size: 16px; margin-bottom: 10px; }
    .card-title { font-size: 14px; }
    .card-desc { font-size: 11.5px; line-height: 1.5; }
}

/* 横屏手机：按钮恢复横排 */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 500px) {
    .btn-row { flex-direction: row; }
    .btn { width: auto; }
}

/* ============================================================
   v20260911 新增：单位后缀 / 默认参数 / 实时结果 / 结果解读
   / 备料清单悬浮按钮与抽屉 / 备料清单页 / 打印 PDF 样式
   ============================================================ */

/* ---------- 输入框单位后缀（米 / 毫米 / ㎡ …） ---------- */
.input-wrap { position: relative; display: block; }
.input-wrap.input-wrap-flex { display: flex; gap: 8px; }
.input-wrap.input-wrap-flex .input-slot { flex: 1; }
.input-slot { position: relative; }
.input-wrap input,
.input-slot input { padding-right: 46px; }
.input-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-light);
    pointer-events: none;
    background: #fff;
    padding-left: 6px;
    line-height: 1;
}

/* 实时计算提示（按钮行内） */
.live-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-light);
}
.live-hint::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(52, 201, 142, 0.16);
}

/* ---------- 默认参数透明说明 ---------- */
.param-box {
    margin-top: 14px;
    background: #f6faff;
    border: 1px dashed #c9dcf2;
    border-radius: 10px;
    padding: 11px 14px;
}
.param-box .param-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-deep);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.param-box .param-label::before { content: '⚙'; font-size: 12px; }
.param-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.param-chips span {
    font-size: 12px;
    color: #53627a;
    background: #fff;
    border: 1px solid #e1e9f4;
    border-radius: 999px;
    padding: 3px 11px;
    line-height: 1.6;
}
.param-chips b { color: var(--primary-deep); font-weight: 700; }
.param-src { font-size: 13px; color: var(--text-light); margin-top: 7px; line-height: 1.6; }

/* ---------- 结果区：空状态 / 解读 / 省料建议 / 免责提示 ---------- */
.result-body[hidden],
.result-empty[hidden] { display: none; }
.result-empty {
    color: var(--text-light);
    font-size: 13.5px;
    padding: 6px 0 2px;
    line-height: 1.8;
}
.result-empty b { color: var(--primary-deep); }
.result-empty::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(52, 201, 142, 0.16);
    margin-right: 8px;
    vertical-align: 1px;
}
.result-explain {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e6eef8;
    border-radius: 8px;
    padding: 11px 14px;
}
.explain-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-deep);
    margin: 0 0 6px;
}
.result-explain ol { margin: 0; padding-left: 19px; }
.result-explain ol li {
    display: list-item;
    justify-content: flex-start;
    border-bottom: none;
    padding: 2px 0;
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.75;
}
.result-tip {
    margin-top: 10px;
    font-size: 12.5px;
    color: #2f7a52;
    background: #f0faf5;
    border: 1px solid #d3f0e0;
    border-radius: 8px;
    padding: 9px 12px;
    line-height: 1.75;
}
.result-tip b { color: #178a5b; font-weight: 700; }
.result-notice {
    margin-top: 10px;
    font-size: 12.5px;
    color: #8a6d2f;
    background: #fff8e8;
    border: 1px solid #f0e0b8;
    border-radius: 8px;
    padding: 9px 12px;
    line-height: 1.75;
}
.btn-add-list {
    margin-top: 12px;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease, background 0.3s ease;
}
.btn-add-list:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(74, 144, 217, 0.42); }
.btn-add-list:active { transform: scale(0.98); }
.btn.added { background: linear-gradient(135deg, #2fb889, #1ea06e) !important; animation: addedPop 0.4s ease; }
@keyframes addedPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.04); }
    100% { transform: scale(1); }
}
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn:disabled::after { display: none; }

/* ---------- 首页备料清单入口卡片 ---------- */
.card-tag {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f5a623, #e07b00);
    border-radius: 999px;
    padding: 2px 9px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(224, 123, 0, 0.35);
    animation: tagPulse 2.4s ease-in-out infinite;
}
@keyframes tagPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.ic-qingdan { background: linear-gradient(135deg, #2fb8a6, #1a8f80); --icon-shadow: rgba(26, 143, 128, 0.32); }

/* ---------- 备料清单：悬浮按钮 ---------- */
#blFab {
    position: fixed;
    left: 18px;
    bottom: 26px;
    z-index: 98;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    padding: 11px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2fb8a6, #1a8f80);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(26, 143, 128, 0.42);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    font-family: inherit;
}
#blFab:hover { filter: brightness(1.06); box-shadow: 0 9px 22px rgba(26, 143, 128, 0.5); transform: translateY(-2px); }
#blFab:active { transform: scale(0.97); }
#blFab .bl-ico {
    width: 20px;
    height: 20px;
    flex: none;
    fill: currentColor;
}
#blFab .bl-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f5a623;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(224, 123, 0, 0.4);
}
#blFab .bl-badge[hidden] { display: none; }

/* ---------- 备料清单：抽屉 ---------- */
#blMask {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(20, 35, 60, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
#blDrawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 92vw);
    z-index: 201;
    background: #f4f7fb;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(20, 35, 60, 0.18);
}
body.bl-open { overflow: hidden; }
body.bl-open #blMask { opacity: 1; visibility: visible; }
body.bl-open #blDrawer { transform: translateX(0); }
.bl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    background: linear-gradient(135deg, #2fb8a6, #1a8f80);
    color: #fff;
    flex: none;
}
.bl-head h3 {
    color: #fff;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bl-head h3 small { font-size: 12px; font-weight: 400; opacity: .85; }
.bl-close {
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    flex: none;
}
.bl-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bl-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 13.5px;
    line-height: 1.9;
    padding: 46px 18px;
}
.bl-empty .bl-empty-ico { font-size: 34px; display: block; margin-bottom: 10px; opacity: .55; }
.bl-empty a { color: #1a8f80; font-weight: 600; text-decoration: none; }
.bl-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 13px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.04);
}
.bl-item-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}
.bl-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90d9, #2f6bbf);
}
.bl-item-title { font-size: 14px; font-weight: 700; color: var(--text-main); flex: 1; line-height: 1.4; }
.bl-item-time { font-size: 11px; color: var(--text-light); flex: none; }
.bl-item-params {
    font-size: 12px;
    color: var(--text-sub);
    background: #f8fafd;
    border-radius: 6px;
    padding: 6px 9px;
    margin-bottom: 6px;
    line-height: 1.65;
    word-break: break-all;
}
.bl-item-rows { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.bl-item-rows .bl-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.6;
}
.bl-item-rows .bl-row b { color: var(--text-main); font-weight: 700; text-align: right; }
.bl-item-actions { display: flex; justify-content: flex-end; }
.bl-del {
    border: none;
    background: none;
    color: #c06b6b;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}
.bl-del:hover { background: #fdf0f0; }
.bl-foot {
    flex: none;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bl-foot .btn { width: 100%; padding: 11px 18px; }
.btn-export {
    background: linear-gradient(135deg, #2fb8a6, #1a8f80) !important;
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 143, 128, 0.3);
}
.btn-export:hover { filter: brightness(1.06); }
.bl-clear {
    background: #f5f6f8;
    border: 1px solid #e2e6ec;
    color: #8a6060;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
}
.bl-clear:hover { background: #fbf1f1; }

/* 加入清单成功提示 toast */
#blToast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) translateY(14px);
    z-index: 210;
    background: rgba(26, 41, 55, 0.94);
    color: #fff;
    font-size: 13.5px;
    padding: 10px 20px;
    border-radius: 999px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90vw;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
#blToast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- 备料清单页（qingdan.html） ---------- */
.qd-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.qd-toolbar .spacer { flex: 1; }
.qd-summary {
    font-size: 13.5px;
    color: var(--text-sub);
    margin-bottom: 14px;
}
.qd-summary b { color: #1a8f80; font-size: 15px; }
.qd-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
    page-break-inside: avoid;
    break-inside: avoid;
}
.qd-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.qd-item-head .bl-item-icon { width: 34px; height: 34px; font-size: 15px; }
.qd-item-title { font-size: 15.5px; font-weight: 700; color: var(--text-main); flex: 1; }
.qd-item-time { font-size: 12px; color: var(--text-light); }
.qd-params {
    font-size: 13px;
    color: var(--text-sub);
    background: #f8fafd;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    line-height: 1.7;
}
.qd-rows {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.qd-rows td {
    padding: 7px 4px;
    border-bottom: 1px dashed #e9eff6;
    color: var(--text-sub);
}
.qd-rows tr:last-child td { border-bottom: none; }
.qd-rows td:last-child { text-align: right; font-weight: 700; color: var(--text-main); white-space: nowrap; }
.qd-item-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.qd-page-note {
    margin-top: 16px;
    font-size: 12.5px;
    color: #8a6d2f;
    background: #fff8e8;
    border: 1px solid #f0e0b8;
    border-radius: 10px;
    padding: 12px 16px;
    line-height: 1.8;
}
.qd-sheet-head { display: none; }
.qd-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
    font-size: 14.5px;
    line-height: 2;
}
.qd-empty .ico { font-size: 42px; display: block; margin-bottom: 12px; opacity: .5; }
.qd-empty .btn { display: inline-block; margin-top: 14px; text-decoration: none; }

/* ---------- 打印 / 导出 PDF ---------- */
@media print {
    header, footer, .back-home, #backTop, #blFab, #blMask, #blDrawer, #blToast,
    .no-print, .qd-toolbar, .qd-item-foot .bl-del { display: none !important; }
    body { background: #fff; display: block; }
    .container { max-width: 100%; padding: 0; margin: 0; }
    main.container { flex: none; }
    section {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
    }
    .qd-sheet-head {
        display: block;
        text-align: center;
        border-bottom: 2px solid #1a2233;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }
    .qd-sheet-head .qd-sheet-title { font-size: 22px; font-weight: 700; color: #1a2233; margin-bottom: 6px; }
    .qd-sheet-head p { font-size: 12.5px; color: #555; margin: 0; }
    .qd-item {
        border: 1px solid #c9d3e0;
        box-shadow: none;
        border-radius: 8px;
        padding: 12px 14px;
        margin-bottom: 10px;
    }
    .qd-item-time { color: #777; }
    .qd-page-note {
        background: #fff;
        border: 1px solid #d8c9a0;
        color: #6d5520;
    }
    .qd-summary { margin-bottom: 10px; }
}

/* ---------- 移动端补充 ---------- */
@media (max-width: 640px) {
    #blFab { left: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); padding: 10px 14px; font-size: 13px; }
    .param-chips span { font-size: 11.5px; padding: 3px 9px; }
    .result-explain { padding: 10px 12px; }
    .result-explain ol li { font-size: 12px; }
    .qd-item { padding: 13px 14px; }
    .qd-rows { font-size: 12.5px; }
    #blToast { font-size: 12.5px; max-width: 88vw; white-space: normal; text-align: center; }
}

/* 尊重用户减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   v20260915 新增：最近使用工具区块 / 复制结果按钮
   / 表单 label-text / 键盘 focus-visible / 加载器品牌
   ============================================================ */

/* ---------- 首页"最近使用"区块 ---------- */
.recent-section {
    margin-top: 28px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(238, 244, 253, 0.7), rgba(242, 239, 254, 0.7));
    border: 1px solid rgba(74, 144, 217, 0.18);
    border-radius: var(--radius);
    padding: 22px 24px 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.recent-section .section-title { margin-top: 0; font-size: 18px; }
.recent-section .section-sub { margin-bottom: 14px; }
.recent-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.recent-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.05);
    transition: transform 0.3s var(--transition-spring), box-shadow 0.3s ease, border-color 0.3s ease;
    animation: fadeUp 0.4s ease backwards;
}
.recent-card:nth-child(1) { animation-delay: 0.02s; }
.recent-card:nth-child(2) { animation-delay: 0.06s; }
.recent-card:nth-child(3) { animation-delay: 0.10s; }
.recent-card:nth-child(4) { animation-delay: 0.14s; }
.recent-card:nth-child(5) { animation-delay: 0.18s; }
.recent-card:nth-child(6) { animation-delay: 0.22s; }
.recent-card:nth-child(7) { animation-delay: 0.26s; }
.recent-card:nth-child(8) { animation-delay: 0.30s; }
.recent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(47, 107, 191, 0.16);
    border-color: rgba(74, 144, 217, 0.5);
    color: var(--primary-deep);
}
.recent-card:active { transform: scale(0.97); }
.recent-ico {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    flex: none;
    box-shadow: 0 2px 6px rgba(74, 144, 217, 0.35);
}
.recent-name { line-height: 1.2; }

/* ---------- 复制结果按钮 ---------- */
.btn-copy {
    margin-top: 12px;
    width: 100%;
    background: #fff;
    border: 1.5px solid #d8dee6;
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-copy::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M16 1H4a2 2 0 0 0-2 2v14h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M16 1H4a2 2 0 0 0-2 2v14h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z'/></svg>") center / contain no-repeat;
    flex: none;
}
.btn-copy:not(:disabled):hover {
    background: #f0f5ff;
    border-color: var(--primary);
    color: var(--primary-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 217, 0.18);
}
.btn-copy.copied {
    background: linear-gradient(135deg, #34c98e, #1ea06e) !important;
    border-color: transparent !important;
    color: #fff;
}
.btn-copy.copied::before { background: #fff; }
.btn-copy:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- 表单 label-text（自定义尺寸行不可用 label+for 时的替代） ---------- */
.form-row .form-label-text {
    font-size: 14px;
    color: #444;
    font-weight: 500;
    transition: color 0.2s ease;
}
.form-row:focus-within .form-label-text {
    color: var(--primary-deep);
}

/* ---------- 键盘 focus-visible（无障碍） ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.btn:focus-visible,
.card:focus-visible,
.links-list li a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- 加载动画品牌化 ---------- */
.loader-spinner {
    position: relative;
}
.loader-spinner::after {
    content: '工';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-deep);
    line-height: 1;
}

/* ---------- 移动端补充 ---------- */
@media (max-width: 640px) {
    .recent-section { padding: 16px 14px 14px; margin-top: 18px; }
    .recent-card { padding: 7px 12px 7px 7px; font-size: 13px; }
    .recent-ico { width: 24px; height: 24px; font-size: 12px; }
}

/* ============================================================
   v20261009 新增：顶部导航（桌面横排 / 移动汉堡菜单）
   / 首页搜索框 / 工具 Tab 面板 / 分类区块 / 底部站内链接
   ============================================================ */

/* ---------- 顶部导航 ---------- */
.topnav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.05);
}
.topnav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}
.topnav-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex: none;
}
.topnav-logo-ico {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 3px 10px rgba(74, 144, 217, 0.35);
}
.topnav-logo-text { font-size: 16.5px; font-weight: 800; color: var(--text-main); letter-spacing: 0.3px; }
.topnav-logo-text b { color: var(--primary-deep); }
.topnav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav-links a {
    font-size: 14px;
    color: var(--text-sub);
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
.topnav-links a:hover { color: var(--primary-deep); background: #eef4fb; }
.topnav-toggle {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}
.topnav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-sub);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.topnav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topnav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.topnav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .topnav-toggle { display: inline-flex; }
    .topnav-links {
        display: none;
        position: absolute;
        top: 56px;
        right: 12px;
        width: 200px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: 0 16px 40px rgba(30, 58, 95, 0.16);
        padding: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin-left: 0;
        z-index: 501;
    }
    .topnav-links.open { display: flex; animation: fadeUp 0.22s ease; }
    .topnav-links a { padding: 11px 14px; font-size: 14.5px; border-radius: 9px; }
}

/* ---------- 首页搜索框 ---------- */
.tool-search {
    max-width: 620px;
    margin: 26px auto 0;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.55s ease 0.22s backwards;
}
.tool-search input {
    width: 100%;
    height: 52px;
    border: 1.5px solid #dbe4f0;
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    color: var(--text-main);
    padding: 0 52px 0 50px;
    box-shadow: 0 6px 22px rgba(30, 58, 95, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.tool-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12), 0 8px 24px rgba(30, 58, 95, 0.1);
}
.tool-search::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background: var(--text-light);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z'/></svg>") center / contain no-repeat;
    pointer-events: none;
}
.search-empty {
    display: none;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    padding: 22px 0 6px;
}
.search-empty.show { display: block; }

/* ---------- 首页工具 Tab 面板 ---------- */
.tool-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-top: 26px;
    padding: 8px 18px 18px;
}
.tool-tabs {
    display: flex;
    gap: 26px;
    border-bottom: 1px solid var(--border);
}
.tool-tabs button {
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    padding: 14px 2px 12px;
    cursor: pointer;
    position: relative;
    font-family: inherit;
    transition: color 0.2s ease;
}
.tool-tabs button:hover { color: var(--primary-deep); }
.tool-tabs button.active { color: var(--primary-deep); }
.tool-tabs button.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.tab-pane { display: none; padding-top: 16px; }
.tab-pane.active { display: block; animation: fadeUp 0.3s ease; }
.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    list-style: none;
}
.chip-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 34px 10px 10px;
    background: #f8fafd;
    border: 1px solid #edf1f7;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 600;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--transition-spring), background 0.25s ease;
}
.chip-item:hover {
    background: #fff;
    border-color: rgba(74, 144, 217, 0.45);
    box-shadow: 0 6px 16px rgba(47, 107, 191, 0.12);
    transform: translateY(-2px);
}
.chip-ico {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: #c4cdd9;
    transition: color 0.2s ease, transform 0.2s var(--transition-spring);
}
.fav-btn svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fav-btn:hover { color: #f5a623; transform: translateY(-50%) scale(1.15); }
.fav-btn.faved { color: #f5a623; }
.fav-btn.faved svg { fill: #f5a623; }
.tab-empty {
    color: var(--text-light);
    font-size: 13.5px;
    text-align: center;
    padding: 26px 10px;
    line-height: 1.9;
}

/* ---------- 分类区块标题（含"查看全部"） ---------- */
.cat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.cat-head .section-title { flex: none; }
.cat-more {
    flex: none;
    font-size: 13px;
    color: var(--primary-deep);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}
.cat-more:hover { color: var(--accent); transform: translateX(2px); }

/* ---------- 底部站内链接 ---------- */
.footer-links { margin-top: 12px; }
.footer-links a {
    display: inline-block;
    margin: 0 9px;
    color: #8b98a9;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: #6db1f5; }

/* ---------- 移动端补充 ---------- */
@media (max-width: 640px) {
    .topnav-inner { padding: 0 14px; height: 52px; }
    .topnav-logo-ico { width: 30px; height: 30px; font-size: 14px; }
    .topnav-logo-text { font-size: 15px; }
    .topnav-links { top: 52px; }
    .tool-search { margin-top: 20px; }
    .tool-search input { height: 48px; font-size: 14px; padding-left: 46px; }
    .tool-panel { padding: 4px 14px 14px; margin-top: 18px; }
    .tool-tabs { gap: 18px; }
    .tool-tabs button { font-size: 14px; padding: 12px 2px 10px; }
    .chip-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .chip-item { font-size: 12.5px; padding: 8px 30px 8px 8px; }
    .chip-ico { width: 26px; height: 26px; font-size: 12px; }
    .footer-links a { margin: 0 7px; font-size: 12.5px; }
}
@media (max-width: 360px) {
    .chip-grid { grid-template-columns: 1fr 1fr; }
}

