:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #374151;
  background: #fff;
  line-height: 1.6;
  
  /* シンプルな白ベースのカラーパレット */
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-warm: #fffcf8;
  --bg-cool: #f8fbff;
  --bg-soft: #fafafa;
  
  --text-main: #3d4654;
  --text-sub: #6b7280;
  --text-muted: #9ca3af;
  
  --accent-warm: #c2714f;
  --accent-cool: #5b8aa8;
  --accent-green: #5a9178;
  --accent-purple: #7d6b99;
  
  --border-light: #e5e5e5;
  --shadow-soft: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-medium: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lift: 0 8px 24px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }
body { margin: 0; background: #ffffff; }
a { color: inherit; text-decoration: none; }

/* ヘッダー */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 28px; }
.site-name { font-weight: 700; font-size: 18px; color: #1f2937; }
.site-tagline { font-size: 13px; color: var(--text-sub); }
.actions { display: flex; gap: 10px; align-items: center; }

/* 立体的なボタン */
.primary, .ghost {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.primary {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: #fff;
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}
.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 41, 55, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.ghost {
  background: linear-gradient(135deg, #fff, #f9fafb);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.8);
}
.ghost:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium), inset 0 1px 0 rgba(255,255,255,0.8);
  background: linear-gradient(135deg, #fff, #f3f4f6);
}

/* 赤ボタン（マイページと同じ） */
.btn-red {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-red:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

/* アップロードボタン（目立つ赤） */
.btn-upload {
  background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
  color: #fff !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-upload:hover {
  background: linear-gradient(135deg, #c0392b, #a93226) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(231, 76, 60, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* 立体的なアクセントボタン（落ち着いた青） */
.btn-accent {
  background: linear-gradient(135deg, #6b9dad, #5a8a9a) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(90, 138, 154, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  border: none !important;
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(90, 138, 154, 0.35);
  background: linear-gradient(135deg, #5a8a9a, #4a7a8a) !important;
  color: #fff !important;
}

/* マイページボタン（赤） */
.btn-mypage {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-mypage:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

/* ログイン・その他ボタン */
.btn-soft {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #4b5563;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
}
.btn-soft:hover {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

main { padding: 32px 24px 80px; max-width: 1200px; margin: 0 auto; }

/* ヒーローセクション */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: center; }
.hero-text h1 { margin: 8px 0; font-size: clamp(26px, 4vw, 40px); line-height: 1.2; color: #1f2937; }
.sub { color: var(--text-sub); margin: 8px 0 12px; }

/* 立体的なラベル */
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: #fef3c7;
  border-radius: 8px;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #92400e;
  font-size: 13px;
  margin: 0 0 8px;
}

.hero-cta { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.stats { display: flex; gap: 12px; color: var(--text-sub); font-size: 14px; flex-wrap: wrap; }
.stats strong { display: block; color: #1f2937; font-size: 20px; }

/* 統計アイテムに背景を追加 */
.stat-item {
  padding: 12px 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.15s;
}
.stat-item:hover {
  transform: translateY(-2px);
}
.stat-item strong {
  display: block;
  color: #1e40af;
  font-size: 22px;
  font-weight: 700;
}
.stat-item span {
  font-size: 12px;
  color: #64748b;
}
/* 参考になった統計（緑色） */
.stat-item.stat-likes {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #6ee7b7;
}
.stat-item.stat-likes strong {
  color: #047857;
}
/* 統計リンクスタイル */
.stat-item.stat-link {
  cursor: pointer;
  text-decoration: none;
}
.stat-item.stat-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ヒーローカード新デザイン - スタイルはindex.phpのインラインで定義 */
.hero-card {
  display: none; /* 旧スタイル非表示 */
}

/* タグチップ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: none;
}
.chip-orange {
  background: #ffedd5;
  color: #c2410c;
}
.chip-red {
  background: #fee2e2;
  color: #dc2626;
}
.chip-blue {
  background: #dbeafe;
  color: #1d4ed8;
}
.chip-cyan {
  background: #cffafe;
  color: #0891b2;
}
.chip-dark {
  background: #f3f4f6;
  color: #374151;
}

.comment {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.commenter { font-size: 13px; color: var(--text-sub); margin-bottom: 4px; }

/* 投稿フォームセクション - 白背景 */
.upload {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-medium);
}
.upload-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 立体的な見出しラベル */
.section-label {
  display: inline-block;
  padding: 8px 16px;
  background: #f3f4f6;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #4b5563;
  box-shadow: var(--shadow-soft);
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.upload-form { display: grid; gap: 14px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field span {
  display: inline-block;
  padding: 4px 10px;
  background: #f3f4f6;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #4b5563;
  width: fit-content;
}

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d6d3d1;
  background: #fff;
  font: inherit;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #a89880;
  box-shadow: 0 0 0 3px rgba(168, 152, 128, 0.15);
}
textarea { resize: vertical; }
.dropzone {
  position: relative;
  border: 2px dashed #d6d3d1;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-hint { text-align: center; color: var(--text-sub); }
.drop-hint strong { display: block; }
.muted { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; color: var(--text-sub); }
.file-list li { padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; }

.actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  white-space: nowrap;
}
.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* カタログセクション - 白背景 */
.catalog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-medium);
}

.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.catalog-head { align-items: flex-start; }

/* 見出しスタイル */
.section-heading {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 18px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

/* 立体的な検索窓 */
.search-panel { max-width: 420px; width: 100%; display: grid; gap: 6px; }
.search-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 16px;
  background: #fff;
  color: var(--text-main);
}
.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 立体的なタグボタン */
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.tag-button {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-weight: 600;
  color: #4b5563;
  transition: all 0.15s ease;
}
.tag-button:hover {
  transform: translateY(-1px);
  background: #f9fafb;
}
.tag-button.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* 並び替えセレクト */
.sort-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.sort-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
}
.sort-select {
  padding: 10px 16px;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, #fafaf9);
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.sort-select:focus {
  outline: none;
  border-color: var(--accent-cool);
}

/* 地域フィルター */
.region-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.region-button {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: #4b5563;
  transition: all 0.15s ease;
}
.region-button:hover {
  background: #f9fafb;
}
.region-button.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* 足場込みバッジ */
.scaffold-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fef3c7;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
}

/* 都道府県バッジ */
.pref-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}

/* 平米単価表示 */
.unit-price {
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  padding: 3px 8px;
  border-radius: 4px;
}

/* カードスタイルはindex.phpのインラインスタイルで定義 */
/* カードヘッダー行 */
.card-header-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* カード情報行 */
.card-info-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.info-label {
  padding: 4px 10px;
  background: #f3f4f6;
  border-radius: 6px;
  font-weight: 600;
  color: #6b7280;
  font-size: 12px;
}
.info-value {
  padding: 4px 10px;
  background: #f9fafb;
  border-radius: 6px;
  color: #1f2937;
  font-weight: 500;
}

/* 価格行 */
.card-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.price-value {
  padding: 6px 12px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}

/* タグ */
.chip-tag {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tags .chip {
  background: #dbeafe;
  color: #1d4ed8;
}
.score-pill {
  padding: 5px 10px;
  border-radius: 8px;
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
  font-size: 13px;
}
.card-actions { margin: 8px 0 0; }
.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #3b82f6;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease;
}
.detail-link:hover {
  transform: translateY(-2px);
  background: #2563eb;
}

/* フィルターセクション */
.filter-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}
.filter-group {
  margin-bottom: 12px;
}
.filter-group:last-of-type {
  margin-bottom: 0;
}
.filter-label {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 10px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  padding: 7px 14px;
  background: linear-gradient(135deg, #fff, #f9fafb);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
}
.filter-chip:hover {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.filter-chip.active {
  background: linear-gradient(135deg, #7d8a96, #6b7784);
  color: #fff;
  border-color: #6b7784;
  box-shadow: 0 4px 12px rgba(107, 119, 132, 0.25);
}
.filter-clear {
  margin-top: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f0e8e5, #e5dbd8);
  border: 1px solid #d5ccc8;
  border-radius: 8px;
  font-size: 13px;
  color: #8b5a52;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(139, 90, 82, 0.08);
}

/* フッター */
.footer {
  text-align: center;
  padding: 32px 24px;
  background: #f9fafb;
  color: var(--text-sub);
  border-top: 1px solid #e5e7eb;
}
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a {
  padding: 6px 12px;
  background: #ffffff;
  border-radius: 8px;
  color: var(--text-sub);
  font-size: 14px;
  box-shadow: var(--shadow-soft);
  transition: all 0.15s;
}
.footer-links a:hover {
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* レスポンシブ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .topbar { position: sticky; }
  .actions-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .actions-row .checkbox { justify-content: center; }
  .actions-row .primary { width: 100%; }
}

/* スマホ対応 */
@media (max-width: 640px) {
  main { padding: 16px 12px 60px; }
  
  .hero-text h1 { font-size: 22px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .primary, .hero-cta .ghost { width: 100%; text-align: center; }
  .stats { justify-content: center; }
  
  .hero-card { padding: 16px; }
  .quote-preview { grid-template-columns: 1fr; }
  
  .upload { padding: 16px; }
  .catalog { padding: 16px; }
  
  .section-head { flex-direction: column; }
  .search-panel { max-width: 100%; }
  
  .tag-row { gap: 6px; }
  .tag-button { padding: 6px 12px; font-size: 13px; }
  
  .filter-section { padding: 12px; }
  .filter-chips { gap: 6px; }
  .filter-chip { padding: 6px 10px; font-size: 12px; }
  
  .topbar { padding: 12px 16px; }
  .site-name { font-size: 16px; }
  .actions { gap: 6px; }
  .actions .primary, .actions .ghost { padding: 8px 12px; font-size: 13px; }
  
  .footer { padding: 24px 16px; }
  .footer-links { gap: 12px; }
  .footer-links a { padding: 6px 10px; font-size: 13px; }
}

/* 静的ページ */
.static-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.static-card {
  background: linear-gradient(135deg, #fff, #fafaf9);
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  padding: 40px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}
.static-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #1f2937;
}
.static-card .update-date {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 32px;
}
.static-card h2 {
  font-size: 20px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #fde68a;
  color: #1f2937;
}
.static-card h3 {
  font-size: 16px;
  margin: 24px 0 12px;
  color: #374151;
}
.static-card p, .static-card li {
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 12px;
}
.static-card ul, .static-card ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.static-card li {
  margin-bottom: 8px;
}
.static-card .warning-box {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
}
.static-card .warning-box strong {
  color: #dc2626;
}
.static-card .info-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
}

/* 問い合わせフォーム */
.contact-form {
  display: grid;
  gap: 20px;
}
.contact-form .form-group {
  display: grid;
  gap: 8px;
}
.contact-form label {
  font-weight: 600;
  color: #374151;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
}
.contact-form button {
  padding: 16px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}
.contact-form button:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
}
