/* 工具鸭 · 工具页通用样式 */
:root {
  --ink: #241f14;
  --muted: #6f6852;
  --soft: #8a8064;
  --line: #e6d9b4;
  --line-soft: #efe4c2;
  --brand: #ffc400;
  --brand-dark: #e0a400;
  --brand-deep: #b97a00;
  --brand-soft: #fff3cc;
  --orange: #f5861f;
  --paper: #fffdf6;
  --card: #ffffff;
  --wrap: 1080px;
  --shadow: 4px 4px 0 rgba(190, 158, 70, .14);
  --shadow-hover: 6px 6px 0 rgba(190, 158, 70, .3);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: #ffe58f; }

/* 头部 */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,253,246,.92); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.header-inner { width: min(var(--wrap), calc(100% - 48px)); margin: auto; height: 62px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); border: 1.5px solid var(--line); display: grid; place-items: center; }
.brand-mark svg { width: 21px; height: 21px; }
.brand-dot { color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--soft); transition: .18s; }
.nav-links a:hover { background: var(--brand-soft); color: var(--brand-deep); }

/* 页面骨架 */
.page-wrap { width: min(900px, calc(100% - 48px)); margin: auto; padding: 30px 0 80px; }
.breadcrumb { font-size: 12.5px; color: #a89a72; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--soft); }
.breadcrumb a:hover { color: var(--brand-deep); }
.breadcrumb .sep { color: var(--line); }
.page-head { margin: 20px 0 22px; }
.page-head h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; line-height: 1.4; letter-spacing: -.3px; }
.page-head p { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.head-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-size: 11px; font-weight: 700; }
.tag.plain { background: #fff; border: 1.5px solid var(--line); color: var(--soft); }

/* 工具面板 */
.tool-panel { background: #fff; border: 1.5px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-hover); padding: 24px; margin-bottom: 34px; }
.drop { border: 2px dashed #e3d3a8; border-radius: 16px; background: linear-gradient(180deg, #fffdf3, #fff9e8); padding: 40px 20px; text-align: center; cursor: pointer; transition: .18s; }
.drop:hover, .drop.over { border-color: var(--brand-dark); background: #fff6d6; }
.drop .ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--brand); border: 1.5px solid var(--line); display: grid; place-items: center; box-shadow: 2px 2px 0 rgba(190,158,70,.3); }
.drop .ico svg { width: 27px; height: 27px; }
.drop b { display: block; font-size: 15.5px; }
.drop span { font-size: 12.5px; color: var(--soft); }
.drop input { display: none; }

.opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.opt-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.chip { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 700; color: var(--soft); cursor: pointer; transition: .15s; font-family: inherit; }
.chip:hover { border-color: var(--brand-dark); color: var(--brand-deep); }
.chip.on { background: var(--brand); border-color: var(--brand-dark); color: var(--ink); }
.target-input { display: flex; align-items: center; gap: 6px; }
.target-input input { width: 92px; padding: 7px 11px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); background: #fffdf6; outline: none; }
.target-input input:focus { border-color: var(--brand-dark); }
.target-input em { font-size: 12.5px; font-style: normal; color: var(--soft); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 24px; border-radius: 12px; background: var(--brand); color: var(--ink); border: 1.5px solid var(--line); box-shadow: 3px 3px 0 rgba(190,158,70,.3); font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: .18s; }
.btn:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(190,158,70,.38); background: #ffcf1f; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn.ghost { background: #fff; color: var(--muted); }

/* 结果区 */
.result { display: none; margin-top: 20px; }
.result.show { display: block; }
.preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pv { background: #fffdf6; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.pv .ph { height: 190px; display: grid; place-items: center; background: repeating-conic-gradient(#f4ecd6 0% 25%, #fffdf6 0% 50%) 50% / 18px 18px; }
.pv .ph img { max-height: 190px; max-width: 100%; object-fit: contain; }
.pv .meta { padding: 10px 12px; font-size: 12px; color: var(--soft); display: flex; justify-content: space-between; gap: 6px; }
.pv .meta b { color: var(--ink); font-size: 13px; }
.pv .meta .good { color: #2e8b57; font-weight: 800; }
.pv .meta .bad { color: #c2410c; font-weight: 800; }
.stat-bar { margin-top: 16px; padding: 14px 16px; border-radius: 13px; background: var(--brand-soft); border: 1.5px solid #f0d789; font-size: 13.5px; color: #574f33; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.stat-bar b { color: var(--ink); }
.actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.err { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fff1e6; border: 1.5px solid #f2c9a8; color: #9a3f0c; font-size: 13.5px; display: none; }
.err.show { display: block; }
.hint-line { margin-top: 14px; font-size: 12.5px; color: var(--soft); }

/* 说明区 */
.section-title { font-size: 20px; font-weight: 800; margin: 36px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-title .num { flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--brand); border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 14px; font-weight: 800; box-shadow: 2px 2px 0 rgba(190,158,70,.3); }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: 13px; font-size: 14.5px; color: #3d382b; }
.step b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.step .n { flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; margin-top: 1px; }
.note-list { margin: 16px 0 10px; display: grid; gap: 10px; list-style: none; }
.note-list li { position: relative; padding: 13px 16px 13px 44px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; font-size: 14.5px; color: #3d382b; }
.note-list li::before { content: ""; position: absolute; left: 16px; top: 18px; width: 14px; height: 11px; background: var(--orange); border: 1.5px solid var(--ink); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.note-list b { color: var(--ink); }

/* FAQ */
.faq { margin: 14px 0 30px; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1.5px solid var(--line); border-radius: 13px; padding: 0 18px; box-shadow: 2px 2px 0 rgba(190,158,70,.1); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; font-size: 15px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; color: var(--brand-deep); transition: transform .2s; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .a { padding: 0 0 16px; font-size: 14.5px; color: #574f33; }

/* 相关工具 */
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.related-card { padding: 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transition: .2s; display: flex; flex-direction: column; gap: 6px; }
.related-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hover); background: #fffdf2; }
.related-card .t { font-size: 14px; font-weight: 700; line-height: 1.55; }
.related-card .m { font-size: 11px; color: #a89a72; }

/* 页脚 */
footer { background: #fff8e2; border-top: 1.5px solid var(--line); }
.footer-inner { width: min(var(--wrap), calc(100% - 48px)); margin: auto; padding: 34px 0 40px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: #a09468; }
.footer-inner a { color: #8a8064; }
.footer-inner a:hover { color: var(--brand-deep); }
.footer-brandline { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #5c553f; }
.footer-brandline .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
.footer-brandline .brand-mark svg { width: 17px; height: 17px; }

@media (max-width: 560px) {
  .header-inner { height: 56px; }
  .nav-links a { padding: 6px 9px; font-size: 12.5px; }
  .page-wrap { padding-top: 22px; }
  .tool-panel { padding: 16px; border-radius: 16px; }
  .preview-row { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}


.footer-icp { margin-top: 10px; font-size: 12px; color: #8a8f9c; text-align: center; }
.footer-icp a { color: #8a8f9c; text-decoration: none; }
.footer-icp a:hover { color: var(--brand); }
