/* ==================== TOOL PAGE — ConvertHub ==================== */

/* コンテナ */
.tp-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* パンくず */
.tp-breadcrumb {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  font-size: .78rem;
  color: var(--text3);
}
.tp-breadcrumb .tp-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tp-bc-item a { color: var(--text2); text-decoration: none; }
.tp-bc-item a:hover { color: var(--gold); }
.tp-bc-current { color: var(--gold); }
.tp-bc-sep { color: var(--text3); }

/* ツールヘッダー */
.tp-tool-header {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
  text-align: center;
}
.tp-format-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}
.tp-format-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 24px;
}
.tp-format-in { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.08); }
.tp-format-out { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.08); }
.tp-format-icon { font-size: 1.6rem; }
.tp-format-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text);
  font-family: var(--font-serif);
}
.tp-format-arrow { color: var(--text3); display: flex; }
.tp-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 700;
}
.tp-sub {
  font-size: .93rem;
  color: var(--text2);
  max-width: 540px;
  margin: 0 auto 20px;
  line-height: 1.65;
}
.tp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.tp-badge {
  display: inline-block;
  background: rgba(200,169,126,0.1);
  border: 1px solid var(--border2);
  color: var(--gold);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: .75rem;
  letter-spacing: .04em;
}

/* 変換エリア */
.tp-converter-wrap {
  background: var(--bg);
  padding: 48px 0;
}
.tp-converter {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ドロップゾーン */
.tp-drop {
  border: 2px dashed var(--border2);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.tp-drop:hover,
.tp-drop.drag-over {
  border-color: #818cf8;
  background: rgba(99,102,241,0.06);
}
.tp-drop-content { pointer-events: none; }
.tp-drop-icon { margin-bottom: 16px; display: flex; justify-content: center; }
.tp-drop-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.tp-drop-or {
  font-size: .82rem;
  color: var(--text3);
  margin-bottom: 14px;
}
.tp-browse-btn {
  display: inline-block;
  pointer-events: auto;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 32px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
  font-family: inherit;
  margin-bottom: 16px;
}
.tp-browse-btn:hover { background: #818cf8; transform: translateY(-1px); }
.tp-drop-hint { font-size: .78rem; color: var(--text3); }
.cv-file-hidden { display: none; }

/* ファイルリスト */
.tp-file-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tp-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}
.tp-file-name {
  flex: 1;
  font-size: .88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-file-size { font-size: .75rem; color: var(--text3); white-space: nowrap; }
.tp-file-remove {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1rem;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, background .15s;
  line-height: 1;
}
.tp-file-remove:hover { color: var(--danger); background: rgba(224,96,96,0.1); }

/* 変換ボタン */
.tp-actions { margin-top: 24px; }
.tp-convert-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.tp-convert-btn:not(:disabled):hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.45);
}
.tp-convert-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
}

/* プログレス */
.tp-progress {
  margin-top: 32px;
  text-align: center;
  padding: 32px;
  background: var(--bg3);
  border-radius: 14px;
}
.tp-progress-label {
  font-size: .95rem;
  color: var(--text2);
  margin-bottom: 16px;
  font-weight: 500;
}
.tp-progress-track {
  background: rgba(200,169,126,0.1);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.tp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  width: 0;
  transition: width .2s ease-out;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
}
.tp-progress-bar.cv-progress-fill--active::after {
  content: '';
  position: absolute;
  top: 0; left: -60%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: tp-shimmer 1.6s linear infinite;
}
@keyframes tp-shimmer { 0% { left: -60% } 100% { left: 120% } }
.tp-progress-pct {
  font-size: .78rem;
  color: var(--text2);
  text-align: right;
  margin-top: 4px;
  min-height: 1.2em;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.tp-progress-hint { font-size: .78rem; color: var(--text3); }

/* 結果 */
.tp-result {
  margin-top: 32px;
  text-align: center;
  padding: 32px;
}
.tp-result-check { margin-bottom: 12px; display: flex; justify-content: center; }
.tp-result-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.tp-dl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.cv-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #0f1b0f;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
}
.cv-dl-btn:hover { opacity: .9; transform: translateY(-1px); color: #0f1b0f; }
.tp-zip-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.tp-zip-btn:hover { opacity: .9; transform: translateY(-1px); }
.tp-zip-btn:disabled { opacity: .6; cursor: default; transform: none; }
.tp-reset-btn {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 10px 24px;
  border-radius: 99px;
  font-size: .88rem;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.tp-reset-btn:hover { border-color: var(--gold); color: var(--gold); }

/* エラー */
.tp-error {
  margin-top: 32px;
  text-align: center;
  padding: 32px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 14px;
}
.tp-error-icon { margin-bottom: 12px; display: flex; justify-content: center; }
.tp-error-msg {
  font-size: .9rem;
  color: #ef4444;
  margin-bottom: 16px;
  white-space: pre-wrap;
}
.tp-retry-btn { margin-top: 0; }

/* コンテンツグリッド */
.tp-content-wrap {
  background: var(--bg2);
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
}
.tp-content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* メインコンテンツ */
.tp-section { margin-bottom: 40px; }
.tp-section:last-child { margin-bottom: 0; }
.tp-section-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.tp-section p {
  font-size: .88rem;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 12px;
}
.tp-section p:last-child { margin-bottom: 0; }

/* ステップ */
.tp-steps { display: flex; flex-direction: column; gap: 16px; }
.tp-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.tp-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: #818cf8;
  margin-top: 2px;
}
.tp-step-body strong {
  display: block;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 600;
}
.tp-step-body p {
  font-size: .84rem;
  color: var(--text2);
  line-height: 1.65;
  margin: 0;
}

/* FAQ */
.tp-faq { display: flex; flex-direction: column; gap: 12px; }
.tp-faq-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.tp-faq-q {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.tp-faq-q::before { content: 'Q. '; color: #818cf8; }
.tp-faq-a {
  font-size: .84rem;
  color: var(--text2);
  line-height: 1.65;
}
.tp-faq-a::before { content: 'A. '; color: var(--gold); font-weight: 600; }

/* サイドバー */
.tp-sidebar-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}
.tp-sidebar-title {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 700;
}
.tp-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tp-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .83rem;
  color: var(--text2);
  line-height: 1.5;
}
.tp-feat-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
.tp-ad-slot {
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: 14px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: .75rem;
}

/* 関連ツール */
.tp-related-wrap {
  background: var(--bg);
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.tp-related-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 24px;
}
.tp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.tp-related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text2);
  font-size: .88rem;
  transition: border-color .2s, background .2s, color .2s;
}
.tp-related-card:hover {
  border-color: var(--border2);
  background: rgba(200,169,126,0.05);
  color: var(--text);
}
.tp-related-icon { font-size: 1.2rem; flex-shrink: 0; }
.tp-related-label { flex: 1; font-weight: 500; }
.tp-related-arrow { color: var(--gold); font-size: .9rem; opacity: .5; transition: opacity .2s; }
.tp-related-card:hover .tp-related-arrow { opacity: 1; }
.tp-related-all { text-align: center; }
.tp-related-all a { color: var(--gold); font-size: .88rem; text-decoration: none; }
.tp-related-all a:hover { color: var(--gold2); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .tp-content-grid {
    grid-template-columns: 1fr;
  }
  .tp-sidebar { order: -1; }
  .tp-sidebar-box { margin-bottom: 16px; }
  .tp-ad-slot { display: none; }
}
@media (max-width: 640px) {
  .tp-tool-header { padding: 32px 0 28px; }
  .tp-format-row { flex-direction: column; gap: 12px; }
  .tp-format-badge { width: 100%; max-width: 200px; justify-content: center; }
  .tp-converter { padding: 20px; }
  .tp-drop { padding: 36px 16px; }
  .tp-convert-btn { font-size: .92rem; padding: 15px; }
  .tp-related-grid { grid-template-columns: 1fr 1fr; }
}
