:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --line: #e4e4e0;
  --brand: #0f766e;
  --brand-dark: #0b5953;
  --ok: #15803d;
  --warn: #b45309;
  --fix: #0f766e;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.75; font-size: 16px; }
a { color: var(--brand); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* 頁首頁尾 */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.logo span { color: var(--brand); }
.nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--brand); }
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); margin-right: 16px; }

/* 標題區 */
.hero { padding: 36px 0 12px; }
.hero h1 { font-size: 30px; line-height: 1.35; margin: 0 0 10px; }
.hero p { color: var(--muted); margin: 0; }
.privacy-note { display: inline-block; margin-top: 12px; background: #e7f5f3; color: var(--brand-dark); padding: 4px 12px; border-radius: 999px; font-size: 14px; }

/* 工具區 */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.drop {
  border: 2px dashed #bcd9d5; border-radius: var(--radius); padding: 40px 20px; text-align: center;
  cursor: pointer; transition: background .15s, border-color .15s; display: block;
}
.drop:hover, .drop.drag, .drop:focus { background: #f0faf8; border-color: var(--brand); outline: none; }
.drop .big { font-size: 18px; font-weight: 600; }
.drop .small { color: var(--muted); font-size: 14px; }
.options { margin-top: 14px; font-size: 15px; color: var(--muted); }
#bulk-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn { border: 1px solid var(--line); background: var(--card); padding: 8px 16px; border-radius: 8px; font-size: 15px; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost:hover { background: var(--bg); }

.file-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.file-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.file-name { word-break: break-all; }
.badge { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: #eef2f1; }
.badge-high { background: #dcfce7; color: var(--ok); }
.badge-medium { background: #fef3c7; color: var(--warn); }
.badge-low { background: #fee2e2; color: #b91c1c; }
.file-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.file-row select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 15px; font-family: inherit; }
.status { margin: 8px 0; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.status-ok { background: #f0fdf4; color: var(--ok); }
.status-warn { background: #fffbeb; color: var(--warn); }
.status-fix { background: #f0faf8; color: var(--fix); }
.preview-label { font-size: 13px; color: var(--muted); }
.preview { background: #fafaf8; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; font-size: 15px; max-height: 220px; overflow: auto; font-family: inherit; }

/* 內容區 */
.content h2 { font-size: 22px; margin: 40px 0 10px; }
.content h3 { font-size: 18px; margin: 24px 0 6px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; text-align: center; line-height: 30px; font-weight: 600; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #f0f0ec; }
code, .mojibake { background: #f0f0ec; padding: 1px 6px; border-radius: 4px; font-size: 14px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
summary { font-weight: 600; cursor: pointer; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 20px 0; }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--text); display: block; }
.tool-card:hover { border-color: var(--brand); }
.tool-card h3 { margin: 0 0 6px; font-size: 17px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-card.soon { opacity: .55; pointer-events: none; }
.tag-soon { font-size: 12px; background: #eee; padding: 1px 8px; border-radius: 999px; margin-left: 6px; color: var(--muted); }

/* 廣告位：AdSense 批核前隱藏，批核後將 display 改為 block */
.ad-slot { display: none; margin: 30px 0; min-height: 100px; text-align: center; }

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .nav a { margin-left: 12px; font-size: 14px; }
}
