/* 맘.css — 맘 탭(27맘 큐브 · 활동 · 14일 막대). 색은 토큰 var 만. 390px 기준 */
.mam-box { display: flex; flex-direction: column; gap: var(--ctc-gap); }
.mam-card { display: flex; flex-direction: column; gap: 12px; }
.mam-card .ctc-hint { margin: 0; }

/* 큐브: 3층을 세로로 살짝 겹쳐 입체감 */
.mam-cube { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.mam-layer {
  --mam-l: 0;
  display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 34px); gap: 6px;
  padding: 8px; border: 1px solid var(--fill-20); border-radius: var(--ctc-radius);
  background: var(--ctc-card);
  transform: perspective(520px) rotateX(48deg);
  transform-origin: center bottom;
  margin-top: -34px;
}
.mam-layer:first-child { margin-top: 0; }
.mam-cell {
  display: block; border-radius: 6px;
  background: var(--fill-10); border: 1px solid var(--fill-20);
}
.mam-cell[data-on] {
  background: var(--ctc-gold); border-color: var(--ctc-accent-deep);
  box-shadow: 0 0 10px var(--ctc-gold);
}
.mam-cube[data-full] .mam-cell[data-on] { box-shadow: 0 0 14px var(--ctc-gold); animation: mam-glow 2.4s ease-in-out infinite; }
@keyframes mam-glow { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }

.mam-sum { text-align: center; }
.mam-big { margin: 0; font-size: var(--fs-heading); }
.mam-big strong { color: var(--ctc-accent); font-size: calc(var(--fs-heading) * 1.4); }
.mam-done { margin: 0; text-align: center; font-weight: 700; color: var(--ctc-accent-deep); }

/* 활동 체크리스트 */
.mam-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mam-act { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--ctc-line); border-radius: var(--ctc-radius); }
.mam-act[data-full] { border-color: var(--ctc-accent); }
.mam-mark { flex: 0 0 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--fill-20); border-radius: 50%; font-size: var(--fs-caption); }
.mam-act[data-full] .mam-mark { background: var(--ctc-accent); border-color: var(--ctc-accent-deep); color: var(--ctc-on-accent); }
.mam-act-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mam-act-name { font-weight: 700; }
.mam-act-meta { color: var(--ctc-mut); font-size: var(--fs-caption); }
.mam-act-left { flex: 0 0 auto; font-size: var(--fs-caption); color: var(--ctc-mut); text-align: right; }
.mam-act[data-full] .mam-act-left { color: var(--ctc-accent-deep); }

/* 14일 막대 */
.mam-days { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.mam-day { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; }
.mam-bar { display: block; width: 100%; max-width: 18px; height: var(--mam-h, 0%); min-height: 2px; flex: 0 0 auto; background: var(--ctc-accent); border-radius: 3px 3px 0 0; }
.mam-bar[data-full] { background: var(--ctc-gold); }
.mam-day { position: relative; }
.mam-day-pts, .mam-day-date { font-size: 10px; color: var(--ctc-mut); line-height: 1.1; }
.mam-day-pts { order: 0; }
.mam-bar { order: 1; }
.mam-day-date { order: 2; }
/* 막대 영역 높이를 막대가 쓰도록 래퍼 대신 최소 높이 확보 */
.mam-day .mam-bar { max-height: 80px; }

@media (max-width: 400px) {
  .mam-layer { grid-template-columns: repeat(3, 30px); grid-template-rows: repeat(3, 30px); margin-top: -30px; }
  .mam-day-date { display: none; }
  .mam-day:nth-child(odd) .mam-day-pts { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .mam-cube[data-full] .mam-cell[data-on] { animation: none; }
  .mam-layer { transition: none; }
}
