/* ===================================
   ãã±ã«æå®å¤.site - TCG Price Comparison Blog
   Mobile-first responsive design
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a56db;
  --primary-light: #e8effc;
  --accent: #e63946;
  --green: #10b981;
  --green-light: #ecfdf5;
  --orange: #f59e0b;
  --bg: #f8f9fa;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --max-w-article: 800px;
  --max-w-index: 1000px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.site-header {
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: var(--max-w-index);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover { text-decoration: none; }

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.header-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  margin-left: 1.25rem;
}
.header-nav a:hover { color: #fff; text-decoration: none; }

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 50%, #7c3aed 100%);
  color: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.hero p {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-w-article);
  margin: 1rem auto;
  padding: 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb span { margin: 0 0.4rem; }

/* --- Main Content --- */
.main-content {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.index-content {
  max-width: var(--max-w-index);
}

/* --- Article Card (Index Page) --- */
.article-list {
  display: grid;
  gap: 1.25rem;
}

.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card a { color: inherit; }
.article-card a:hover { text-decoration: none; }

.card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-light), #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb-placeholder {
  font-size: 3rem;
  opacity: 0.3;
}

.discount-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.card-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.card-price {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

/* --- Article Page --- */
.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-light);
  align-items: center;
}

.update-badge {
  background: var(--green-light);
  color: var(--green);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* --- Price Comparison Table --- */
.price-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  font-size: 0.9rem;
}

.price-table thead {
  background: var(--text);
  color: #fff;
}

.price-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.price-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.price-table tbody tr:hover {
  background: #f8fafc;
}

.price-table .best-deal {
  background: var(--green-light);
}

.price-table .best-deal td {
  font-weight: 600;
}

/* Platform badges */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.platform-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.platform-rakuten .platform-dot { background: #bf0000; }
.platform-yahoo .platform-dot { background: #ff0033; }
.platform-amazon .platform-dot { background: #ff9900; }
.platform-mercari .platform-dot { background: #4dc9f6; }
.platform-surugaya .platform-dot { background: #006837; }

.price-value {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.price-effective {
  font-size: 0.75rem;
  color: var(--text-light);
}

.points-tag {
  font-size: 0.7rem;
  color: var(--orange);
  font-weight: 600;
}

.buy-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}

.buy-btn:hover {
  background: #1e40af;
  color: #fff;
  text-decoration: none;
}

.best-deal .buy-btn {
  background: var(--green);
}

.best-deal .buy-btn:hover {
  background: #059669;
}

/* --- Article Body --- */
.article-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary);
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul, .article-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.3rem;
}

/* --- Info Box --- */
.info-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.alert-box {
  background: #fef2f2;
  border-left-color: var(--accent);
}

/* --- Best Price Summary --- */
.best-price-summary {
  background: linear-gradient(135deg, var(--green-light), #d1fae5);
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.best-price-summary .label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.best-price-summary .price {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
}

.best-price-summary .source {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: none;
}

.related-grid {
  display: grid;
  gap: 1rem;
}

.related-card {
  display: flex;
  gap: 1rem;
  background: var(--bg-white);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.related-card:hover { text-decoration: none; box-shadow: var(--shadow-md); }

/* --- Footer --- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  margin-top: 3rem;
}

.site-footer a { color: rgba(255,255,255,0.8); }
.footer-links { margin-bottom: 0.75rem; }
.footer-links a { margin: 0 0.75rem; }

/* --- Responsive --- */
@media (min-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 3rem 1.5rem; }
  .article-header h1 { font-size: 1.6rem; }
  .article-list { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 2.2rem; }
  .article-list { grid-template-columns: repeat(3, 1fr); }
  .price-table { font-size: 0.95rem; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
