/* =========================================
   WebTool Free — style.css
   ========================================= */
:root {
  --bg-body: #0a0a0f;
  --bg-card: #13131a;
  --bg-panel: #1a1a24;
  --bg-input: #1e1e2a;
  --text-main: #e0e0f0;
  --text-muted: #8888aa;
  --accent: #00d1ff;
  --accent-green: #00e676;
  --accent-red: #ff5252;
  --border: #2a2a3a;
  --font-base: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ===== リセット & 基本 ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-base);
  margin: 0;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }
h1, h2, h3 { color: #fff; margin-top: 0; }

/* ===== ヘッダー ===== */
header {
  background: rgba(10, 10, 20, 0.97);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 1000;
}
.header-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
}
.logo strong { color: #fff; font-size: 1.4rem; }
.nav-wrapper { display: flex; align-items: center; }
.menu { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.menu li a { color: #dde; font-weight: 600; font-size: 0.9rem; }
.menu li a:hover { color: var(--accent); }

/* ハンバーガー */
.hamburger-btn {
  display: none; cursor: pointer; z-index: 1001;
  width: 30px; height: 22px; position: relative;
}
.hamburger-btn .bar {
  display: block; width: 100%; height: 2px;
  background: #fff; position: absolute; left: 0; transition: 0.3s;
}
.hamburger-btn .bar:nth-child(1) { top: 0; }
.hamburger-btn .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-btn .bar:nth-child(3) { bottom: 0; }

/* ===== コンテナ ===== */
.container { max-width: 900px; margin: 0 auto; padding: 30px 20px 60px; }

/* ===== ヒーロー ===== */
.hero {
  text-align: center;
  padding: 50px 20px 40px;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 14px; }
.hero-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto 20px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.badge {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px; font-size: 0.85rem; color: var(--accent);
}

/* ===== WASMステータス ===== */
.wasm-status {
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.wasm-status.loading {
  background: rgba(0,209,255,0.08);
  border: 1px solid rgba(0,209,255,0.2);
  color: var(--accent);
}
.wasm-status.ready {
  background: rgba(0,230,118,0.08);
  border: 1px solid rgba(0,230,118,0.2);
  color: var(--accent-green);
}
.wasm-status.error {
  background: rgba(255,82,82,0.08);
  border: 1px solid rgba(255,82,82,0.2);
  color: var(--accent-red);
}
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== タブ ===== */
.tool-tabs {
  display: flex; gap: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: 12px 22px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== ツールパネル ===== */
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 28px;
  margin-bottom: 40px;
}
.tool-panel h2 { font-size: 1.4rem; margin-bottom: 6px; }
.tool-desc { color: var(--text-muted); margin-bottom: 22px; }

/* ===== ドロップゾーン ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-input);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(0,209,255,0.05);
}
.drop-icon { font-size: 3rem; margin-bottom: 10px; }
.drop-zone p { margin: 4px 0; color: var(--text-muted); }
.drop-sub { font-size: 0.85rem; }

/* ===== ファイルリスト ===== */
.file-list {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}
.file-list-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.file-list-header h3 { margin: 0; font-size: 1rem; }
.file-list ul, .file-list-ul {
  list-style: none; margin: 0; padding: 0;
}
#create-files-ul li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
#create-files-ul li:last-child { border-bottom: none; }
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--text-muted); font-size: 0.8rem; margin: 0 10px; }
.btn-remove {
  background: none; border: none; color: var(--accent-red);
  cursor: pointer; font-size: 1rem; padding: 0 4px;
}

/* ===== オプション ===== */
.compress-options { margin-top: 16px; }
.compress-options label { display: block; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }
.text-input {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-main);
  padding: 8px 12px; font-size: 0.95rem;
  width: 260px; margin-top: 4px;
}
.text-input:focus { outline: none; border-color: var(--accent); }

/* ===== ボタン ===== */
.btn-primary {
  background: var(--accent); color: #000;
  border: none; border-radius: 6px;
  padding: 10px 22px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s;
  display: inline-block;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-large { padding: 14px 32px; font-size: 1.05rem; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-download {
  background: var(--accent-green); color: #000;
  border: none; border-radius: 6px;
  padding: 10px 22px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s;
}
.btn-download:hover { opacity: 0.85; }

.action-area { margin-top: 22px; }

/* ===== プログレス ===== */
.progress-area { margin-top: 20px; }
.progress-bar {
  background: var(--bg-input); border-radius: 50px;
  height: 8px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  border-radius: 50px;
  transition: width 0.3s;
}
.progress-area p { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }

/* ===== 結果 ===== */
.result-area {
  margin-top: 20px;
  background: var(--bg-panel);
  border: 1px solid rgba(0,230,118,0.3);
  border-radius: var(--radius);
  padding: 20px;
}
.result-success { display: flex; align-items: center; gap: 16px; }
.result-icon { font-size: 2rem; }
.result-info p { margin: 0 0 10px; color: var(--accent-green); font-weight: 600; }

/* ===== 解凍ファイルリスト ===== */
.extract-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.extract-header h3 { margin: 0; }
.extract-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 400px; overflow-y: auto;
}
.extract-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  gap: 10px;
}
.extract-list li:last-child { border-bottom: none; }
.extract-list .file-type { font-size: 1.2rem; width: 24px; text-align: center; }
.extract-list .file-path { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); }
.extract-list .file-size { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.btn-dl-single {
  background: none; border: 1px solid var(--accent);
  color: var(--accent); border-radius: 4px;
  padding: 3px 10px; font-size: 0.8rem; cursor: pointer;
  white-space: nowrap;
}
.btn-dl-single:hover { background: var(--accent); color: #000; }

/* ===== PDFツール追加スタイル ===== */
.file-info-text { color: var(--accent-green); font-size: 0.9rem; margin-top: 12px; }
.hint-text { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.file-actions { display: flex; align-items: center; gap: 4px; }
.btn-order {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 4px;
  padding: 2px 7px; font-size: 0.8rem; cursor: pointer;
}
.btn-order:hover { border-color: var(--accent); color: var(--accent); }
#create-files-ul li,
#merge-files-ul li,
#img2pdf-ul li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
#merge-files-ul li:last-child,
#img2pdf-ul li:last-child { border-bottom: none; }
#merge-files-ul .file-name,
#img2pdf-ul .file-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
select.text-input { cursor: pointer; }

/* ===== How to ===== */
.how-to { margin-top: 50px; }
.how-to h2 { text-align: center; margin-bottom: 28px; font-size: 1.6rem; }
.how-to-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-to-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.step-num {
  width: 40px; height: 40px;
  background: var(--accent); color: #000;
  border-radius: 50%; font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.how-to-card h3 { margin-bottom: 8px; }
.how-to-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ===== 特徴 ===== */
.features { margin-top: 50px; }
.features h2 { text-align: center; margin-bottom: 28px; font-size: 1.6rem; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-icon { font-size: 2rem; margin-bottom: 10px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ===== ページコンテンツ ===== */
.page-article { max-width: 760px; margin: 0 auto; }
.page-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 1.8rem; }
.page-desc { color: var(--text-muted); margin: 0; }
.page-content { line-height: 1.9; }
.page-content h2 { margin-top: 36px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.page-content p { color: var(--text-muted); }

/* ===== SEO FAQ ===== */
.seo-faq {
  padding-top: 0;
}
.seo-faq h2 {
  text-align: center;
  margin-bottom: 20px;
}
.seo-faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.seo-faq summary {
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.seo-faq p {
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* ===== ツールカード（トップページ） ===== */
.other-tools { margin-top: 50px; }
.other-tools h2 { text-align: center; margin-bottom: 20px; font-size: 1.5rem; }
.tool-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tool-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 16px;
  color: var(--text-main); text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text-main); }
.tool-card-icon { font-size: 2.4rem; margin-bottom: 10px; }
.tool-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.tool-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; line-height: 1.5; }

/* ===== 画像最適化ツール ===== */
.img-tool-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.img-left { display: flex; flex-direction: column; gap: 16px; }
.img-right { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }

/* 設定パネル */
.settings-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.settings-panel h3 { margin: 0 0 16px; font-size: 1rem; color: var(--accent); }
.setting-row { margin-bottom: 16px; }
.setting-label { display: block; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 6px; font-weight: 600; }
.w-full { width: 100%; }
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider { flex: 1; accent-color: var(--accent); }
.slider-label { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; }
.resize-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.resize-input { width: 90px; }
.resize-x { color: var(--text-muted); }
.checkbox-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; }
.checkbox-label input { accent-color: var(--accent); width: 16px; height: 16px; }

/* 機能説明 */
.img-feature-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.82rem;
}
.img-feature-info h4 { color: var(--accent); margin: 0 0 6px; font-size: 0.85rem; }
.img-feature-info h4:not(:first-child) { margin-top: 12px; }
.img-feature-info ul { margin: 0; padding-left: 18px; color: var(--text-muted); line-height: 1.8; }

/* ファイルリスト */
.img-list-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.img-list-header h3 { margin: 0; font-size: 1rem; }
.img-list-empty { color: var(--text-muted); font-size: 0.9rem; padding: 12px 0; }
.img-list { display: flex; flex-direction: column; gap: 8px; }

.img-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.img-thumb {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: 6px; background: var(--bg-panel); flex-shrink: 0;
}
.img-item-info { flex: 1; min-width: 0; }
.img-item-name { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-item-meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }
.badge-exif {
  display: inline-block; background: rgba(255,165,0,0.2);
  border: 1px solid rgba(255,165,0,0.5); color: #ffa500;
  border-radius: 4px; padding: 1px 6px; font-size: 0.72rem; margin-left: 6px;
}
.badge-ok {
  display: inline-block; color: var(--accent-green); font-size: 0.78rem; margin-top: 3px;
}
.img-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

@media (max-width: 900px) {
  .img-tool-layout { grid-template-columns: 1fr; }
  .img-right { position: static; }
}

/* ===== フッター ===== */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  margin-top: 60px;
}
.footer-container { max-width: 900px; margin: 0 auto; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 12px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text-muted); font-size: 0.82rem; margin: 0; }

/* ===== リストアイテム ===== */
.list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.list-item h2 { margin: 0 0 8px; font-size: 1.1rem; }
.list-item p { color: var(--text-muted); margin: 0; font-size: 0.9rem; }

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {
  .hamburger-btn { display: block; }
  .nav-wrapper {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5,5,15,0.97);
    flex-direction: column; justify-content: center; align-items: center;
    z-index: 999;
  }
  .nav-wrapper.active { display: flex; }
  .menu { flex-direction: column; text-align: center; gap: 28px; }
  .menu li a { font-size: 1.2rem; }
  .how-to-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .tool-panel { padding: 20px 14px; }
  .extract-header { flex-direction: column; align-items: flex-start; }
  .result-success { flex-direction: column; }
  .text-input { width: 100%; }
  .tool-tabs { overflow-x: auto; }
  .conv-two-col { grid-template-columns: 1fr; }
  .conv-json-layout { grid-template-columns: 1fr; }
}

/* =========================================
   変換ツール (convert-tool)
   ========================================= */
.conv-tabs { flex-wrap: wrap; gap: 6px; }
.conv-tabs .tab-btn { font-size: 0.82rem; padding: 8px 14px; }

.conv-panel { padding: 28px; }

.conv-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.conv-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.conv-card h3 { margin-bottom: 8px; font-size: 1.05rem; }

.conv-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-top: 14px;
  font-size: 0.9rem;
}
.conv-result.success {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}
.conv-result.error {
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.conv-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 12px;
}
.conv-preview-tall { max-height: 380px; }

.conv-html-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  font-size: 0.9rem;
  max-height: 260px;
  overflow-y: auto;
  color: var(--text-main);
}
.conv-html-preview h1, .conv-html-preview h2, .conv-html-preview h3 { color: var(--accent); }
.conv-html-preview code { background: var(--bg-body); padding: 2px 6px; border-radius: 4px; }
.conv-html-preview pre { background: var(--bg-body); padding: 12px; border-radius: 6px; overflow-x: auto; }
.conv-html-preview table { border-collapse: collapse; width: 100%; }
.conv-html-preview th, .conv-html-preview td { border: 1px solid var(--border); padding: 6px 10px; }

.conv-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: monospace;
  font-size: 0.85rem;
  padding: 10px 12px;
  resize: vertical;
  min-height: 120px;
  margin-top: 6px;
  line-height: 1.5;
}
.conv-textarea:focus { outline: none; border-color: var(--accent); }

.conv-json-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.json-input-wrap { position: relative; }

.validate-badge {
  display: block;
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1.2em;
}
.validate-badge.ok { color: var(--accent-green); }
.validate-badge.err { color: var(--accent-red); }

.conv-img-preview {
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 12px;
}

.file-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fname-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.mt-8 { margin-top: 8px; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(0, 209, 255, 0.12); }

/* =========================================
   プライバシーツール (privacy-tool)
   ========================================= */
.priv-tabs { flex-wrap: wrap; gap: 6px; }
.priv-tabs .tab-btn { font-size: 0.82rem; }

.priv-info-box {
  display: flex;
  gap: 16px;
  background: rgba(0, 209, 255, 0.05);
  border: 1px solid rgba(0, 209, 255, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.priv-info-icon { font-size: 2rem; line-height: 1; }
.priv-info-box strong { display: block; color: var(--accent); margin-bottom: 8px; }
.priv-info-list { margin: 0; padding-left: 1.4em; color: var(--text-muted); font-size: 0.85rem; }
.priv-info-list li { margin-bottom: 3px; }

.priv-file-ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.priv-file-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
}
.priv-file-item.loading { opacity: 0.6; }
.priv-file-item.clean  { border-color: var(--accent-green); }
.priv-file-item.done   { border-color: rgba(0, 209, 255, 0.4); }
.priv-file-item.error  { border-color: var(--accent-red); }
.pfi-name   { color: var(--text-main); font-weight: 600; word-break: break-all; }
.pfi-tags   { display: flex; flex-wrap: wrap; gap: 4px; }
.pfi-size   { color: var(--text-muted); white-space: nowrap; font-size: 0.78rem; }
.pfi-status { color: var(--text-muted); }
.error-text { color: var(--accent-red); }

.meta-tag {
  display: inline-block;
  background: rgba(255, 82, 82, 0.15);
  border: 1px solid rgba(255, 82, 82, 0.4);
  color: #ff8a80;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.75rem;
  white-space: nowrap;
}
.meta-tag.removed {
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.4);
  color: var(--accent-green);
}

.priv-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* PDF メタデータ */
.pdf-meta-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.pdf-meta-panel h4 { color: var(--accent); margin: 0 0 12px; }
.meta-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.meta-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); }
.meta-table td:first-child { color: var(--text-muted); width: 140px; }
.meta-table td:last-child { color: var(--text-main); word-break: break-all; }
.meta-clean-badge {
  color: var(--accent-green);
  font-size: 0.9rem;
  padding: 8px 0;
}

/* ファイル名正規化 */
.fn-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.fn-table-scroll { overflow-x: auto; margin-top: 12px; }
.fn-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.fn-table th {
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.fn-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fn-changed td { background: rgba(0, 209, 255, 0.03); }
.fn-ok td { opacity: 0.65; }
.fn-orig { color: var(--text-muted); word-break: break-all; }
.fn-arrow { color: var(--accent); font-weight: bold; text-align: center; }
.fn-new { color: var(--text-main); font-weight: 600; word-break: break-all; }
.fn-issues { min-width: 140px; }
.ok-text { color: var(--accent-green); }
.issue-tag {
  display: inline-block;
  background: rgba(255, 179, 0, 0.12);
  border: 1px solid rgba(255, 179, 0, 0.4);
  color: #ffb300;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  margin: 1px;
  white-space: nowrap;
}

.fn-legend {
  margin-top: 28px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.fn-legend h4 { color: var(--accent); margin: 0 0 8px; }
.fn-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.fn-ex {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
}
.fn-bad   { color: var(--accent-red); font-weight: 600; }
.fn-good  { color: var(--accent-green); font-weight: 600; }
.fn-ex .fn-arrow { color: var(--text-muted); font-weight: normal; }

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-xs:hover { opacity: 0.85; }

@media (max-width: 600px) {
  .priv-file-item { grid-template-columns: 1fr; }
  .fn-options { grid-template-columns: 1fr; }
  .priv-info-box { flex-direction: column; }
}

/* =========================================
   アーカイブツール (archive-tool)
   ========================================= */

/* 対応形式バッジ行 */
.arc-format-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.arc-fmt-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.arc-fmt-badge.supported {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: var(--accent-green);
}
.arc-fmt-badge.unsupported {
  background: rgba(136, 136, 170, 0.1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: help;
}

/* 検出フォーマットバッジ */
.arc-detected-badge {
  background: rgba(0, 209, 255, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ファイルテーブル */
.arc-file-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.arc-table-wrap { overflow-x: auto; }
.arc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.arc-table th {
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 600;
  padding: 7px 12px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.arc-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.arc-fname { word-break: break-all; color: var(--text-main); }
.arc-fsize { white-space: nowrap; color: var(--text-muted); }

/* 設定パネル */
.arc-settings {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}

/* 形式解説グリッド */
.arc-format-guide { margin-top: 40px; }
.arc-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.arc-guide-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.arc-guide-card:hover { border-color: rgba(0, 209, 255, 0.4); }
.arc-guide-icon { font-size: 2rem; margin-bottom: 8px; }
.arc-guide-card h3 { margin: 4px 0 8px; font-size: 1rem; color: var(--accent); }
.arc-guide-card p { color: var(--text-muted); font-size: 0.84rem; margin: 0 0 10px; }
.arc-guide-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.arc-tag {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
}

.btn-danger-xs {
  background: rgba(255, 82, 82, 0.15);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}
.btn-danger-xs:hover { background: rgba(255, 82, 82, 0.3); }

@media (max-width: 640px) {
  .arc-guide-grid { grid-template-columns: 1fr; }
}

/* ── EPUB変換ツール ── */
.epub-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95em;
  margin: 8px 0;
}
.epub-status.loading { background: rgba(100,100,255,0.15); color: #aaaaff; }
.epub-status.ready   { background: rgba(50,205,100,0.15);  color: #50c878; }
.epub-status.error   { background: rgba(255,80,80,0.15);   color: #ff6b6b; }

.epub-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.epub-meta-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9em;
  color: var(--text-muted);
}
.epub-chapter-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  max-height: 260px;
  overflow-y: auto;
}
.epub-chapter-header {
  font-size: 0.9em;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.epub-chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.epub-chapter-list li {
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.epub-chapter-list li:last-child { border-bottom: none; }
.epub-chapter-list .ch-num {
  background: rgba(100,120,255,0.2);
  color: #8899ff;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.8em;
  min-width: 28px;
  text-align: center;
}
.epub-chapter-list small { color: var(--text-muted); margin-left: auto; }

@media (max-width: 600px) {
  .epub-meta-grid { grid-template-columns: 1fr; }
}
