/* ============================================================
   リンク切れチェッカーむぎ — style.css
   ============================================================ */

/* ── リセット ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── デザイントークン ── */
:root {
  --bg:           #FDF4EA;
  --surface:      #FFFFFF;
  --surface2:     #F5EAD8;
  --border:       rgba(73,167,206,0.15);
  --border2:      rgba(73,167,206,0.30);
  --text:         #2C2C2C;
  --muted:        #7A7A7A;
  --accent:       #49A7CE;
  --accent-dark:  #3388AD;
  --accent-light: rgba(73,167,206,0.10);
  --accent-glow:  rgba(73,167,206,0.20);
  --success:      #2DA870;
  --warning:      #D48A10;
  --danger:       #D64545;
  --success-bg:   rgba(45,168,112,0.09);
  --warning-bg:   rgba(212,138,16,0.09);
  --danger-bg:    rgba(214,69,69,0.09);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ── ベース ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.7;
}

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

/* ============================================================
   ヘッダー
   ============================================================ */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  padding: 0 2rem;
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: block;
}
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.logo-text small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0;
}
.header-free-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-family: 'Noto Sans JP', sans-serif;
}

.header-usage-count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  white-space: nowrap;
}

.header-usage-count strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ============================================================
   ヒーロー
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #FDF4EA 0%, #FEF1DA 50%, #FDF4EA 100%);
  border-bottom: 2px solid rgba(73,167,206,0.15);
  padding: 2.8rem 2rem 0;
  overflow: hidden;
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.hero-text {
  flex: 1;
  padding-bottom: 2.5rem;
}
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-lead {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 1.4rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #AAAAAA;
  flex-shrink: 0;
  display: inline-block;
}
.hero-chara {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.hero-chara img {
  width: 300px;
  height: 300px;
  object-fit: contain;
  object-position: bottom;
  display: block;
}

/* ============================================================
   ツール本体
   ============================================================ */
.tool-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.tool-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* 入力カード */
.input-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 2px 16px rgba(73,167,206,0.07);
}
.input-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.input-card .sub {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.field-label .req {
  color: var(--danger);
  margin-left: 3px;
  text-transform: none;
  font-size: 0.8rem;
}

/* モードタブ */
.mode-tabs {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.1rem;
  width: fit-content;
}
.mode-tab {
  padding: 0.5rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: var(--bg);
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid var(--border2);
}
.mode-tab:last-child { border-right: none; }
.mode-tab.active {
  background: var(--accent);
  color: #fff;
}

/* テキスト入力 */
.url-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1.1rem;
  resize: vertical;
}
.url-input::placeholder { color: #B0B0B0; }
.url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea.url-input { min-height: 130px; margin-bottom: 1.1rem; }

/* フィルター（チェックピル） */
.checks-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
  display: block;
}
.checks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.check-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border2);
  border-radius: 999px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  color: var(--muted);
  user-select: none;
}
.check-pill.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 500;
}
.check-pill input { display: none; }

/* Basic認証 */
.auth-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 1rem;
  user-select: none;
  width: fit-content;
}
.auth-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.auth-toggle span {
  font-size: 0.855rem;
  color: var(--muted);
}
.auth-fields {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  animation: fadeIn 0.2s ease;
}
.auth-fields.visible { display: grid; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-fields .url-input { margin-bottom: 0; }

/* 区切り線 */
.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.4rem 0;
}

/* 実行ボタン */
.btn-run {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-run:hover  { background: var(--accent-dark); }
.btn-run:active { transform: scale(0.99); }
.btn-run:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* リセットボタン */
.btn-reset {
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  margin-top: 0.6rem;
  transition: color 0.15s, border-color 0.15s;
}
.btn-reset:hover { color: var(--text); border-color: var(--accent); }

/* ============================================================
   進捗カード
   ============================================================ */
.progress-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-top: 1.5rem;
  display: none;
  box-shadow: 0 2px 16px rgba(73,167,206,0.07);
}
.progress-card.visible { display: block; }

.progress-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.pstat { display: flex; flex-direction: column; gap: 2px; }
.pstat-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pstat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pstat-value.danger-val { color: var(--danger); }

.progress-pct {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.progress-bar-wrap {
  background: var(--surface2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
  width: 0%;
}
.progress-url {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   結果エリア（ミーナさん）
   ============================================================ */

/* ステータス表示 */
.status {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.status.show { display: flex; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-error-text { color: var(--danger); }

/* 結果エリア */
#result-area { display: none; margin-top: 2rem; }
#result-area.show { display: block; }

.result-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border2);
  margin-bottom: 1.75rem;
}
.tab-btn {
  padding: 0.6rem 1.2rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* プレビューグリッド */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.preview-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.preview-card-head {
  background: var(--surface2);
  padding: 0.7rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.preview-card-body { padding: 1.1rem; }

/* カラーパレット グループ見出し */
.palette-group-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
  margin: 0.75rem 0 0.5rem;
}
.palette-group-title:first-child { margin-top: 0; }

/* カラースウォッチ */
.swatch-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.swatch-color {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.swatch-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  max-width: 60px;
  word-break: break-all;
}
.swatch-role { font-size: 0.62rem; color: var(--accent); font-weight: 600; }

/* タイポグラフィ */
.typo-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.typo-row:last-child { border-bottom: none; }
.typo-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 28px;
}
.typo-sample { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.typo-meta {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}

/* フォントチップ */
.font-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  margin: 4px 4px 4px 0;
}

/* 背景プレビュー */
.bg-preview {
  height: 64px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,.08);
  margin-bottom: 0.5rem;
}
.bg-meta { font-family: 'Outfit', sans-serif; font-size: 0.75rem; color: var(--muted); }

/* Spacing バー */
.spacing-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.spacing-bar {
  height: 12px;
  background: var(--accent-light);
  border: 1px solid var(--border2);
  border-radius: 3px;
  display: inline-block;
}
.spacing-meta { font-family: 'Outfit', sans-serif; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* UIパーツ */
.ui-part-row { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.ui-part-row:last-child { border-bottom: none; }
.ui-part-name { font-family: 'Outfit', sans-serif; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.ui-part-sel { font-family: 'Courier New', monospace; font-size: 0.7rem; color: var(--accent); margin-bottom: 0.4rem; word-break: break-all; }
.ui-part-props { display: flex; flex-wrap: wrap; gap: 4px; }
.ui-prop {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 0.7rem;
  color: var(--text);
  font-family: 'Courier New', monospace;
}
.ui-prop-key { color: var(--accent-dark); font-weight: 600; }

/* DESIGN.md テキスト */
.md-wrapper {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.md-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1e2e;
  padding: 0.6rem 1rem;
}
.md-filename { font-family: 'Outfit', sans-serif; font-size: 0.82rem; color: #cdd6f4; }
.btn-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  color: #cdd6f4;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-copy:hover { background: rgba(255,255,255,.18); }
.md-content {
  background: #1e1e2e;
  color: #cdd6f4;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  padding: 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 600px;
  overflow-y: auto;
}
.md-content .md-h1  { color: #89dceb; font-size: 1rem; font-weight: 700; }
.md-content .md-h2  { color: #89b4fa; font-size: 0.88rem; font-weight: 700; }
.md-content .md-h3  { color: #a6e3a1; font-size: 0.82rem; font-weight: 600; }
.md-content .md-val { color: #f38ba8; }
.md-content .md-key { color: #fab387; }


/* ============================================================
   コンテンツセクション
   ============================================================ */
.content-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
}
.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-lead {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  transition: box-shadow 0.15s;
}
.feature-card:hover { box-shadow: 0 4px 16px rgba(73,167,206,0.10); }
.feature-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.feature-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.feature-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }

.usecase-list { display: flex; flex-direction: column; gap: 1rem; }
.usecase-item {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.usecase-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-top: 1px;
}
.usecase-body strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.usecase-body p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   開発コスト表
   ============================================================ */
.cost-table-wrap { overflow-x: auto; }
.cost-table {
  width: 100%;
  max-width: 480px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cost-table th,
.cost-table td {
  padding: 0.7rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.cost-table th {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface2);
  text-transform: uppercase;
}
.cost-table td:nth-child(2),
.cost-table td:nth-child(3) { text-align: right; }
.cost-table th:nth-child(2),
.cost-table th:nth-child(3) { text-align: right; }
.cost-table-total td {
  font-weight: 600;
  color: var(--text);
  background: var(--accent-light);
  border-top: 2px solid var(--border2);
  border-bottom: none;
}

/* ============================================================
   フッター
   ============================================================ */
footer.site-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 2rem;
  border-top: 1px solid var(--border2);
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }
  .hero-chara { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .auth-fields { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; }
  .header-usage-count { display: none; }
}
