* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-color: #2a2520;
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  color: #5d3b1a;
}

/* 背景オーバーレイ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 37, 32, 0.75);
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ヘッダー */
.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(180deg, rgba(244, 233, 214, 0.95), rgba(212, 196, 168, 0.95));
  border: 3px solid #5d3b1a;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.title {
  font-size: 2.5rem;
  color: #5d3b1a;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.subtitle {
  font-size: 0.9rem;
  color: #a99278;
  letter-spacing: 0.1em;
}

/* カードグリッド */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* 各カード - kingdom風 */
.memory-card {
  position: relative;
  background: #F4E9D6;
  border: 2px solid #5d3b1a;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.memory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}


/* キャラ画像 - 32x32ドット絵用 */
.char-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  border: 2px solid #5d3b1a;
  margin-bottom: 12px;
  background: #d4c4a8;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 名前 */
.char-name {
  font-size: 1.25rem;
  font-weight: bold;
  color: #5d3b1a;
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #a99278;
}

/* ステータス */
.char-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: rgba(169, 146, 120, 0.15);
  border-radius: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: #a99278;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: bold;
  color: #5d3b1a;
}

/* 空状態 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(244, 233, 214, 0.9);
  border: 2px solid #5d3b1a;
  border-radius: 8px;
}

.empty-state p {
  font-size: 1.1rem;
  color: #a99278;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .header .title {
    font-size: 1.75rem;
    letter-spacing: 0.1em;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
