/* ============================================================
   浮云梦音频工具箱 - 站点样式（深浅双主题）
   主题变量通过 html[data-theme] 切换，波形颜色取自 --primary
   ============================================================ */

:root {
    --primary: #0d9488;
    --primary-strong: #0f766e;
    --primary-soft: rgba(13, 148, 136, 0.12);
    --accent-warm: #d97706;
    --bg: #f4f6f8;
    --surface-1: #ffffff;
    --surface-2: #eef1f4;
    --surface-3: #e3e8ed;
    --ink: #17202a;
    --ink-muted: #4b5563;
    --ink-subtle: #8a94a3;
    --hairline: #dde3ea;
    --danger: #dc2626;
    --ok: #16a34a;
    --shadow-card: 0 1px 2px rgba(23, 32, 42, 0.05), 0 8px 24px rgba(23, 32, 42, 0.06);
    --shadow-pop: 0 12px 36px rgba(23, 32, 42, 0.16);
    --rounded-sm: 6px;
    --rounded: 12px;
    --rounded-lg: 18px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --transition-fast: 0.15s ease;
}

html[data-theme="dark"] {
    --primary: #2dd4bf;
    --primary-strong: #5eead4;
    --primary-soft: rgba(45, 212, 191, 0.14);
    --accent-warm: #fbbf24;
    --bg: #0e1319;
    --surface-1: #161d26;
    --surface-2: #1c2632;
    --surface-3: #243040;
    --ink: #e6ebf1;
    --ink-muted: #a8b3c2;
    --ink-subtle: #6b7787;
    --hairline: #2a3646;
    --danger: #f87171;
    --ok: #4ade80;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 12px 36px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.75;
    font-size: 16px;
    transition: background 0.2s ease, color 0.2s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--spacing-md); }

/* ---------- 头部 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface-1);
    border-bottom: 1px solid var(--hairline);
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: 60px;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.06rem;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-logo { flex: none; }

.logo-bg { fill: var(--primary); }
.logo-bars { stroke: #fff; fill: none; }
html[data-theme="dark"] .logo-bars { stroke: #0b1220; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--rounded-sm);
    color: var(--ink-muted);
    font-size: 0.94rem;
    transition: var(--transition-fast);
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-link.active { color: var(--primary); font-weight: 600; }

.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
    padding: 7px 13px;
    border: none;
    background: none;
    border-radius: var(--rounded-sm);
    color: var(--ink-muted);
    font-size: 0.94rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}
.nav-dropdown-trigger::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    vertical-align: 2px;
    transition: var(--transition-fast);
}
.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger { background: var(--surface-2); color: var(--ink); }
.nav-dropdown.open .nav-dropdown-trigger::after { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 230px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    box-shadow: var(--shadow-pop);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--rounded-sm);
    color: var(--ink-muted);
    font-size: 0.92rem;
    white-space: nowrap;
}
.nav-dropdown-menu li a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-dropdown-menu li a.active { color: var(--primary); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle-btn,
.nav-burger {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background: var(--surface-1);
    color: var(--ink);
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.theme-toggle-btn:hover,
.nav-burger:hover { background: var(--surface-2); }
.nav-burger { display: none; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
    padding: var(--spacing-md) 0 0;
    font-size: 0.88rem;
    color: var(--ink-subtle);
}
.breadcrumb a { color: var(--ink-subtle); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { margin: 0 8px; }

/* ---------- Hero ---------- */
.product-hero { padding: var(--spacing-md) 0 var(--spacing-sm); }

.product-hero h1 {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.9rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.product-hero p { margin: 0 0 0.8em; color: var(--ink-muted); max-width: 62em; }
.product-hero p strong { color: var(--ink); }

.at-hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px !important; }

.at-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.at-hero-badge-free {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
    font-weight: 600;
}
html[data-theme="dark"] .at-hero-badge-free { color: var(--primary); }

/* ---------- 提示条 ---------- */
.at-notice {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: var(--spacing-md) 0;
}

.at-notice-item {
    padding: 13px 16px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--rounded-sm);
    font-size: 0.86rem;
    color: var(--ink-muted);
    line-height: 1.7;
}
.at-notice-item strong {
    display: block;
    color: var(--primary-strong);
    margin-bottom: 3px;
    font-size: 0.88rem;
}
html[data-theme="dark"] .at-notice-item strong { color: var(--primary); }

/* ---------- 首页工具网格 ---------- */
.at-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: var(--spacing-md) 0;
}

.at-tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    box-shadow: var(--shadow-card);
    color: var(--ink);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.at-tool-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-pop);
    text-decoration: none;
}

.at-tool-icon { font-size: 1.7rem; line-height: 1; }

.at-tool-card b { font-size: 1.04rem; color: var(--ink); }

.at-tool-card span {
    font-size: 0.86rem;
    color: var(--ink-muted);
    line-height: 1.65;
    flex: 1;
}

.at-tool-card em {
    align-self: flex-start;
    font-style: normal;
    font-size: 0.74rem;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-subtle);
}

.at-tool-card .at-free-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 600;
}
html[data-theme="dark"] .at-tool-card .at-free-tag { color: var(--primary); }

/* ---------- 工具主体 ---------- */
.at-tool {
    position: relative;
    margin: var(--spacing-md) 0;
    padding: 26px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow-card);
}

.at-ribbon {
    position: absolute;
    top: -1px;
    right: 24px;
    padding: 4px 14px 5px;
    background: var(--primary);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.03em;
}
html[data-theme="dark"] .at-ribbon { color: #0b1220; }

/* 拖拽区 */
.at-drop {
    border: 2px dashed var(--hairline);
    border-radius: var(--rounded);
    padding: 34px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}
.at-drop:hover,
.at-drop:focus,
.at-drop.is-dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.at-drop-icon { font-size: 2.2rem; margin-bottom: 6px; }

.at-drop-text { margin: 0 0 4px; font-size: 1.02rem; font-weight: 600; color: var(--ink); }

.at-drop-hint { margin: 0 0 16px; font-size: 0.84rem; color: var(--ink-subtle); }

.at-drop-actions { display: flex; justify-content: center; gap: 10px; }

/* 按钮 */
.at-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background: var(--surface-1);
    color: var(--ink);
    font-size: 0.94rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}
.at-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-subtle); }
.at-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.at-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.at-btn-primary:hover:not(:disabled) { background: var(--primary-strong); border-color: var(--primary-strong); }
html[data-theme="dark"] .at-btn-primary { color: #0b1220; }

.at-btn-ghost { background: transparent; }

/* 波形与播放 */
.at-stage {
    display: none;
    margin-top: var(--spacing-md);
    padding: 16px;
    background: var(--surface-2);
    border-radius: var(--rounded);
}
.at-stage.is-ready { display: block; }

.at-wave-wrap {
    position: relative;
    height: 130px;
    border-radius: var(--rounded-sm);
    overflow: hidden;
    background: var(--surface-1);
}

.at-wave { display: block; width: 100%; height: 100%; cursor: crosshair; }

.at-transport {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.at-play {
    width: 42px;
    height: 42px;
    flex: none;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.at-play:hover { background: var(--primary-strong); }
html[data-theme="dark"] .at-play { color: #0b1220; }

.at-time { font-variant-numeric: tabular-nums; font-size: 0.92rem; color: var(--ink-muted); }
.at-time b { color: var(--ink); font-weight: 600; }

.at-sel-info { font-size: 0.85rem; color: var(--primary-strong); }
html[data-theme="dark"] .at-sel-info { color: var(--primary); }

/* 控件区 */
.at-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px 22px;
    margin-top: var(--spacing-md);
    padding: 18px;
    background: var(--surface-2);
    border-radius: var(--rounded);
}

.at-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.at-field input[type="text"],
.at-field input[type="number"],
.at-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background: var(--surface-1);
    color: var(--ink);
    font-size: 0.92rem;
    font-family: inherit;
    transition: var(--transition-fast);
}
.at-field input:focus,
.at-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.at-field code {
    padding: 1px 6px;
    background: var(--surface-3);
    border-radius: 4px;
    font-size: 0.84em;
}

.at-note { margin: 6px 0 0; font-size: 0.79rem; color: var(--ink-subtle); line-height: 1.6; }

.at-hint {
    margin: 14px 0 0;
    padding: 11px 15px;
    background: var(--primary-soft);
    border-radius: var(--rounded-sm);
    font-size: 0.86rem;
    color: var(--ink-muted);
    line-height: 1.7;
}

.at-range-row { display: flex; align-items: center; gap: 12px; }

.at-range {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--surface-3);
    border-radius: 999px;
    outline: none;
}
.at-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--surface-1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.at-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--surface-1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.at-value {
    flex: none;
    min-width: 74px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-strong);
}
html[data-theme="dark"] .at-value { color: var(--primary); }

.at-check {
    display: flex !important;
    align-items: center;
    gap: 9px;
    font-weight: 500 !important;
    cursor: pointer;
}
.at-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

.at-name-row { display: flex; gap: 10px; }

/* 合并列表 */
.at-merge {
    margin-top: var(--spacing-md);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    overflow: hidden;
}

.at-merge-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-2);
    font-size: 0.92rem;
}

.at-merge-count { color: var(--ink-subtle); font-size: 0.85rem; }

.at-merge-list { margin: 0; padding: 0; list-style: none; }

.at-merge-empty {
    padding: 22px 16px;
    text-align: center;
    color: var(--ink-subtle);
    font-size: 0.88rem;
}

.at-merge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--hairline);
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.at-merge-order {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
}
html[data-theme="dark"] .at-merge-order { color: var(--primary); }

.at-merge-name {
    flex: 1;
    min-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.at-merge-dur { color: var(--ink-subtle); font-variant-numeric: tabular-nums; }

.at-merge-gain { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 0.82rem; }
.at-merge-gain input {
    width: 64px;
    padding: 4px 7px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background: var(--surface-1);
    color: var(--ink);
    font-size: 0.85rem;
}

.at-merge-actions { display: inline-flex; gap: 4px; }

.at-mini {
    width: 28px;
    height: 28px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background: var(--surface-1);
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: var(--transition-fast);
}
.at-mini:hover { background: var(--surface-2); color: var(--ink); }
.at-mini-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* 录音面板 */
.at-rec-panel {
    margin-top: var(--spacing-md);
    padding: 20px;
    background: var(--surface-2);
    border-radius: var(--rounded);
    text-align: center;
}

.at-rec-timer {
    font-size: 2.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.at-rec-level {
    display: block;
    width: 100%;
    max-width: 460px;
    height: 18px;
    margin: 12px auto 16px;
    background: var(--surface-3);
    border-radius: 999px;
}

/* 操作区 */
.at-est { margin-top: 14px; font-size: 0.86rem; color: var(--ink-subtle); }

.at-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: var(--spacing-md);
}
.at-rec-panel .at-actions { justify-content: center; margin-top: 0; }

.at-split {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* 进度与状态 */
.at-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.at-progress {
    flex: 1;
    height: 8px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.at-progress-bar {
    width: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.2s ease;
}

#at-progress-text { font-size: 0.82rem; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }

.at-status { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-muted); min-height: 1.4em; }
.at-status.is-ok { color: var(--ok); }
.at-status.is-error { color: var(--danger); }

.at-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.at-metric {
    padding: 7px 14px;
    background: var(--surface-2);
    border-radius: 999px;
    font-size: 0.83rem;
    color: var(--ink-muted);
}
.at-metric b { color: var(--ink); margin-right: 6px; }
.at-metric.is-warn { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.at-metric.is-warn b { color: var(--danger); }

/* 结果卡片 */
.at-result {
    margin-top: var(--spacing-md);
    padding: 18px;
    border: 1px solid var(--primary);
    border-radius: var(--rounded);
    background: var(--primary-soft);
}

.at-result-head {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-strong);
    margin-bottom: 10px;
}
html[data-theme="dark"] .at-result-head { color: var(--primary); }

.at-result audio { width: 100%; display: block; }

.at-result-info { margin: 10px 0 0; font-size: 0.84rem; color: var(--ink-muted); }

/* ---------- 统计条 ---------- */
.at-statbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    margin: var(--spacing-md) 0;
    padding: 13px 20px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    font-size: 0.86rem;
    color: var(--ink-muted);
    box-shadow: var(--shadow-card);
}

.at-statbar-item b { color: var(--primary-strong); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .at-statbar-item b { color: var(--primary); }

.at-statbar-main { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

.at-statbar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
    animation: atPulse 2s infinite;
}

@keyframes atPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
    50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.05); }
}

.at-statbar-sub { color: var(--ink-subtle); font-size: 0.82rem; }

/* ---------- 正文区块 ---------- */
.at-sec {
    margin: var(--spacing-lg) 0 0;
}
.at-sec h2 {
    margin: 0 0 14px;
    font-size: 1.34rem;
    letter-spacing: -0.01em;
}
.at-sec p { color: var(--ink-muted); margin: 0 0 0.9em; max-width: 68em; }
.at-sec ul, .at-sec ol { color: var(--ink-muted); padding-left: 1.5em; margin: 0 0 1em; }
.at-sec li { margin-bottom: 0.45em; }
.at-sec li strong { color: var(--ink); }

.at-steps { counter-reset: step; list-style: none; padding: 0 !important; }
.at-steps li {
    position: relative;
    padding: 14px 18px 14px 58px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    margin-bottom: 10px;
    color: var(--ink-muted);
}
.at-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
html[data-theme="dark"] .at-steps li::before { color: #0b1220; }
.at-steps li strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* GEO 参数对照表 */
.geo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.2em;
    font-size: 0.89rem;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    overflow: hidden;
    display: table;
}
.geo-table th, .geo-table td {
    padding: 11px 15px;
    text-align: left;
    border-bottom: 1px solid var(--hairline);
    vertical-align: top;
    color: var(--ink-muted);
}
.geo-table th {
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
}
.geo-table tr:last-child td { border-bottom: none; }
.geo-table td:first-child { white-space: nowrap; color: var(--ink); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    overflow: hidden;
    transition: border-color 0.15s ease;
}
.faq-item.open { border-color: var(--primary); }

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 19px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink);
    transition: var(--transition-fast);
}
.faq-question:hover { background: var(--surface-2); }

.faq-question h3 {
    margin: 0;
    font-size: 0.99rem;
    font-weight: 600;
    line-height: 1.55;
}

.faq-toggle {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--primary-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}
html[data-theme="dark"] .faq-toggle { color: var(--primary); }
.faq-item.open .faq-toggle { transform: rotate(45deg); background: var(--primary); color: #fff; }
html[data-theme="dark"] .faq-item.open .faq-toggle { color: #0b1220; }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.faq-item.open .faq-answer { max-height: 500px; }

.faq-answer-inner {
    padding: 0 19px 17px;
    color: var(--ink-muted);
    font-size: 0.91rem;
    line-height: 1.8;
}

/* ---------- 相关推荐 ---------- */
.at-related { margin: var(--spacing-lg) 0; }
.at-related h2 { margin: 0 0 14px; font-size: 1.34rem; }

.at-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.at-related-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px 18px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded);
    color: var(--ink);
    transition: var(--transition-fast);
}
.at-related-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-card); }
.at-related-card b { font-size: 0.95rem; color: var(--primary-strong); }
html[data-theme="dark"] .at-related-card b { color: var(--primary); }
.at-related-card span { font-size: 0.82rem; color: var(--ink-subtle); line-height: 1.6; }

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: 60px;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid var(--hairline);
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-lg);
}

.footer-brand-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.footer-brand-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-subtle);
    line-height: 1.75;
    max-width: 34em;
}

.footer-col-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ink);
}

.footer-col-links { display: flex; flex-direction: column; gap: 2px; }

.footer-col-links .sitemap-link {
    padding: 4px 0;
    font-size: 0.86rem;
    color: var(--ink-subtle);
}
.footer-col-links .sitemap-link:hover { color: var(--primary); text-decoration: none; }

.footer-bottom {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--hairline);
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-subtle);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .at-tools-grid { grid-template-columns: repeat(2, 1fr); }
    .at-related-grid { grid-template-columns: repeat(2, 1fr); }
    .at-notice { grid-template-columns: 1fr; }
    .footer-columns { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-md); }
    .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .header-inner { height: 54px; }
    .brand-name { font-size: 0.98rem; }

    .nav-burger { display: inline-flex; }

    .header-nav {
        display: none;
        position: absolute;
        top: 54px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px var(--spacing-md) 16px;
        background: var(--surface-1);
        border-bottom: 1px solid var(--hairline);
        box-shadow: var(--shadow-pop);
    }
    .header-nav.open { display: flex; }
    .nav-link { padding: 10px 13px; }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 14px;
        max-height: none;
    }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }

    .product-hero h1 { font-size: 1.42rem; }
    .at-sec h2, .at-related h2 { font-size: 1.18rem; }

    .at-tool { padding: 18px 14px; margin-left: -4px; margin-right: -4px; }
    .at-ribbon { right: 16px; }

    .at-controls { grid-template-columns: 1fr; padding: 14px; }

    .at-statbar { border-radius: var(--rounded); gap: 6px 16px; }

    .at-merge-item { gap: 8px; }
    .at-merge-gain input { width: 56px; }

    .geo-table { font-size: 0.82rem; display: block; overflow-x: auto; white-space: nowrap; }
    .geo-table td:first-child { white-space: nowrap; }

    .footer-columns { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { font-size: 0.74rem; }
}

@media (max-width: 480px) {
    .at-tools-grid { grid-template-columns: 1fr; }
    .at-related-grid { grid-template-columns: 1fr; }
    .at-actions .at-btn { flex: 1; }
}

/* 深色下滚动条 */
html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
