.learning-map-entry { margin: 0 0 28px; }
.learning-map-entry a { display: block; padding: 18px 20px; border: 2px solid #225c48; border-radius: 12px; background: #fff; color: #225c48; text-decoration: none; font-family: system-ui, sans-serif; line-height: 1.7; overflow-wrap: anywhere; }
.learning-map-entry strong, .learning-map-entry span { display: block; }
.learning-map-entry span { margin-top: 6px; font-size: .92rem; color: #454b44; }
.learning-map-entry a:focus-visible { outline: 3px solid #96344f; outline-offset: 4px; }
:root {
  --bg-color: #f7f4ea;
  --card-bg: #ffffff;
  --text-main: #2c2c2c;
  --accent-yellow: #ffde59;
  --accent-red: #ff5757;
  --handwritten-font: 'Yomogi', 'Kalam', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--handwritten-font);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 全螢幕繪圖背景 */
#doodleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

/* Header AIMYON 貼紙質感 */
.aimyon-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.tape-sticker {
  display: inline-block;
  background: rgba(255, 222, 89, 0.85);
  padding: 6px 24px;
  font-size: 1.2rem;
  font-weight: bold;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  border-left: 3px dashed #e67e22;
  border-right: 3px dashed #e67e22;
  margin-bottom: 15px;
}

.title {
  font-size: 2.8rem;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0px var(--accent-yellow);
}

.title span {
  display: block;
  font-size: 1.5rem;
  color: #666;
  margin-top: 5px;
}

/* 卡片網格 RWD */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 35px;
}

/* 拍立得 3D 卡片樣式 */
.card-item {
  --song-color: #1a1a1a;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border: 2px solid var(--song-color);
  border-top-width: 7px;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-item::before {
  /* 模擬頂部透明膠帶固定 */
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  width: 90px;
  height: 25px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.sticker-icon {
  font-size: 2.2rem;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.2));
}

.link-label {
  color: var(--song-color);
  font-size: 0.9rem;
  font-weight: bold;
}

.song-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.3;
}

.song-subtitle {
  font-size: 1rem;
  color: #777;
  margin-bottom: 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag {
  background: #f0f0f0;
  background: color-mix(in srgb, var(--song-color) 12%, white);
  border: 1px solid var(--song-color);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.85rem;
}

/* hover 黑膠光澤線條感 */
.card-item:hover {
  box-shadow: 0 20px 35px color-mix(in srgb, var(--song-color) 25%, transparent);
}

.card-item:focus-visible {
  outline: 4px solid var(--song-color);
  outline-offset: 5px;
}

footer {
  text-align: center;
  margin-top: 60px;
  font-size: 1.1rem;
  color: #888;
}

/* 手機版 RWD 微調 */
@media (max-width: 600px) {
  .title { font-size: 2rem; }
  .grid-container { grid-template-columns: 1fr; }
  .container { padding: 28px 16px; }
  .card-item { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-item { transition: none; }
  #doodleCanvas { display: none; }
}
