/* ============================================================
   출석체크 — 디자인 시안 기준 (흰 카드 · 파스텔 블루 · 픽셀 오리)
   ============================================================ */

/* ---------- 카드 헤더 ---------- */
.gg-att-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gg-att-pill {
  font-size: 11px; font-weight: 900; color: #f08c00;
  background: #fff4e0; border: 1px solid #ffd9a0;
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.gg-att-pill b { color: #f08c00; }

/* ---------- 오리 + 말풍선 ---------- */
.gg-att-hero { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gg-att-duck { width: 58px; height: 62px; object-fit: contain; image-rendering: pixelated; flex: none; }
.gg-att-bubble {
  position: relative; flex: 1;
  background: #f2f7fc; border: 1px solid #e3edf9; border-radius: 12px;
  padding: 9px 12px; font-size: 12px; font-weight: 800; color: var(--tx); line-height: 1.5;
}
.gg-att-bubble::before {
  content: ""; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-right-color: #f2f7fc;
}
@keyframes ggAttJump {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-12px) rotate(-4deg); }
  70%      { transform: translateY(0); }
  85%      { transform: translateY(-4px); }
}
.gg-att-duck.is-jump { animation: ggAttJump .45s ease; }

/* ---------- 요일: 오리 발자국 아이콘 ----------
   색상은 전부 CSS 변수로 관리 */
:root {
  --footprint-complete: #4cd964;   /* 출석 완료 */
  --footprint-today: #3b82f6;      /* 오늘 */
  --footprint-empty: #e5e7eb;      /* 미출석 */
}
.gg-att-days { display: flex; justify-content: space-between; margin-bottom: 12px; }
.gg-att-day-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gg-att-day-wrap em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--tx-sub); }

.gg-att-day {
  position: relative;
  width: 30px; height: 30px; border-radius: 50%;
  background: #f1f4f8; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--footprint-empty);            /* 발자국 색 = currentColor */
  transition: transform .2s ease;
}
.gg-att-day .gg-fp { width: 19px; height: 19px; display: block; }
.gg-att-day .gg-fp-check {
  position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px;
  opacity: 0; transform: scale(0);
  transition: opacity .2s ease, transform .25s cubic-bezier(.2, 1.4, .4, 1);
}

/* 출석 완료: 초록 발자국 + 흰 체크, Hover 시 살짝 확대 */
.gg-att-day.is-done {
  background: rgba(76, 217, 100, .16);
  color: var(--footprint-complete);
}
.gg-att-day.is-done .gg-fp { opacity: .45; }
.gg-att-day.is-done .gg-fp-check { opacity: 1; transform: scale(1); }
.gg-att-day.is-done:hover { transform: scale(1.1); }
.gg-att-day.is-done .gg-fp-check path { stroke: #2f9e4f; }

/* 오늘: 흰 배경 + 파란 외곽선 + 파란 발자국 + 약한 Glow */
.gg-att-day.is-today {
  background: #fff;
  border-color: var(--footprint-today);
  color: var(--footprint-today);
  box-shadow: 0 0 8px rgba(59, 130, 246, .35);
}

/* 미출석: 연회색 발자국, Hover 없음 */

/* 출석 순간: 발자국이 바닥에 "꾹" 찍히는 도장 느낌 (0.8 → 1.1 → 1.0, 0.3초) */
@keyframes ggStampIn {
  0%   { transform: scale(.8); }
  55%  { transform: scale(1.1); }
  80%  { transform: scale(.97); }
  100% { transform: scale(1); }
}
.gg-att-day.is-stamp { animation: ggStampIn .3s cubic-bezier(.3, 1.3, .4, 1); }
.gg-att-day.is-stamp .gg-fp-check { transition-delay: .12s; }

/* ---------- 진행도 ---------- */
.gg-att-progress-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; font-weight: 800; color: var(--tx-sub); margin-bottom: 6px;
}
.gg-att-progress-row b { color: var(--tx); }
.gg-att-bar { margin-bottom: 12px; }
.gg-att-bar > i { transition: width .4s ease; }
.gg-att-bar > i.is-green { background: linear-gradient(90deg, #4cd06a, #2db14e); }

/* ---------- 오늘의 보상 박스 ---------- */
.gg-att-reward {
  display: flex; align-items: center; gap: 12px;
  background: #f2f7fc; border: 1px solid #e3edf9; border-radius: 12px;
  padding: 11px 13px; margin-bottom: 12px;
  transition: background .3s ease, border-color .3s ease;
}
.gg-att-reward-img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; flex: none; }
.gg-att-reward-label { font-size: 11px; font-weight: 800; color: var(--tx-sub); }
.gg-att-reward-amt { font-size: 17px; font-weight: 900; color: var(--blue); }
.gg-att-reward-sub { font-size: 10.5px; font-weight: 700; color: var(--tx-sub); }
.gg-att-reward.is-done { background: #e9f9ee; border-color: #bfe9cb; }
.gg-att-reward.is-done .gg-att-reward-amt { color: #2db14e; }
.gg-att-reward.is-done .gg-att-reward-sub { color: #2f9e4f; }

/* ---------- 출석 완료 버튼(비활성) ---------- */
.gg-att-done-btn {
  display: flex; align-items: center; justify-content: center;
  height: 38px; border-radius: 12px;
  background: #e9f9ee; border: 1px solid #bfe9cb;
  color: #2f9e4f; font-size: 13px; font-weight: 900;
  cursor: default;
}

/* ---------- 보상 보기 링크 ---------- */
.gg-att-more {
  margin-top: 9px; text-align: center;
  font-size: 11.5px; font-weight: 800; color: var(--tx-sub); cursor: pointer;
  transition: color .2s ease;
}
.gg-att-more:hover { color: var(--blue); }

/* ---------- 출석 완료 글로우 ---------- */
.gg-att.is-glow {
  box-shadow: 0 6px 20px rgba(96, 143, 214, .1), 0 0 30px rgba(76, 208, 106, .55) !important;
  transition: box-shadow .3s ease;
}

/* ---------- 동전 튀는 효과 ---------- */
.gg-att { position: relative; overflow: hidden; }
.gg-att-coin-fx {
  position: absolute; width: 22px; height: 22px;
  image-rendering: pixelated; pointer-events: none; z-index: 5;
  animation: ggCoinFly .85s cubic-bezier(.2, .7, .4, 1) forwards;
  opacity: 0;
}
@keyframes ggCoinFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(.6) rotate(0deg); }
  60%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(220deg); }
}

/* ---------- 페이지(큰) 버전 ---------- */
.gg-att-lg .gg-att-duck { width: 76px; height: 82px; }
.gg-att-lg .gg-att-bubble { font-size: 13.5px; padding: 12px 16px; }
.gg-att-lg .gg-att-day { width: 38px; height: 38px; }
.gg-att-lg .gg-att-day .gg-fp { width: 24px; height: 24px; }
.gg-att-lg .gg-att-day .gg-fp-check { width: 19px; height: 19px; }
.gg-att-lg .gg-att-reward-amt { font-size: 20px; }
.gg-att-lg .gg-att-reward-img { width: 52px; height: 52px; }

/* ============================================================
   보상/월간 달력 모달
   ============================================================ */
.gg-att-modal { width: 760px; max-width: calc(100vw - 32px); max-height: 88vh; overflow-y: auto; }
.gg-att-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.gg-att-modal-x { font-size: 16px; font-weight: 900; color: var(--tx-sub); cursor: pointer; padding: 2px 6px; }
.gg-att-modal-x:hover { color: var(--tx); }

/* 7일 보상 카드 */
.gg-att-rw-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 10px; }
.gg-att-rw {
  position: relative;
  border: 1px solid var(--card-border); border-radius: 12px; background: #f8fbfe;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 11px 4px;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

/* ---------- 받은 보상: 연초록 배경 + 초록 테두리 + 체크 배지 + 글로우 (Hover에도 유지) ---------- */
.gg-att-rw.is-got,
.gg-att-rw.is-got:hover {
  background: #f3fff5;
  border-color: #7fd898;
  box-shadow: 0 0 10px rgba(76, 217, 100, .28);
}
@keyframes ggBadgeIn {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.gg-att-rw-badge {
  position: absolute; top: -7px; right: -7px;
  width: 19px; height: 19px; border-radius: 50%;
  background: linear-gradient(180deg, #4cd964, #2db14e);
  color: #fff; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(45, 177, 78, .4);
  animation: ggBadgeIn .3s cubic-bezier(.2, 1.4, .4, 1);
}

/* ---------- 오늘 받을 보상: 파란 테두리 + 천천히 빛나는 펄스 ---------- */
@keyframes ggRwPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(59, 130, 246, .25); }
  50%      { box-shadow: 0 0 16px rgba(59, 130, 246, .6); }
}
.gg-att-rw.is-next {
  border-color: #3b82f6;
  animation: ggRwPulse 2.2s ease-in-out infinite;
}

/* ---------- 7일차 랜덤박스: 받기 전 보라 반짝임 / 받은 후 금색 글로우 ---------- */
@keyframes ggBoxTwinkle {
  0%, 100% { box-shadow: 0 0 4px rgba(125, 91, 214, .2); }
  50%      { box-shadow: 0 0 14px rgba(125, 91, 214, .5); }
}
.gg-att-rw.is-box:not(.is-got):not(.is-next) { animation: ggBoxTwinkle 2.8s ease-in-out infinite; }
.gg-att-rw.is-box.is-got,
.gg-att-rw.is-box.is-got:hover {
  border-color: #f0c24b;
  box-shadow: 0 0 14px rgba(245, 197, 66, .55);
}
.gg-att-rw-day { font-size: 11.5px; font-weight: 900; color: var(--tx); }
.gg-att-rw img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.gg-att-rw-amt { font-size: 11px; font-weight: 800; color: var(--tx); }
.gg-att-rw.is-box { border-color: #b9a8f5; background: #f6f2ff; }
.gg-att-rw.is-box .gg-att-rw-day, .gg-att-rw.is-box .gg-att-rw-amt { color: #7d5bd6; }
.gg-att-rw-note {
  text-align: center; font-size: 11.5px; font-weight: 700; color: var(--tx-sub);
  margin-bottom: 18px;
}

/* 월간 달력 */
.gg-att-cal-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 900; color: var(--tx); margin-bottom: 12px;
}
.gg-att-cal-wrap { display: flex; gap: 14px; align-items: stretch; }
.gg-att-cal-side {
  flex: none; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 6px;
}
.gg-att-cal-side img { width: 110px; height: 66px; object-fit: contain; image-rendering: pixelated; }
.gg-att-cal-summary {
  width: 100%; text-align: center;
  border: 1px solid var(--card-border); border-radius: 12px; background: #f8fbfe;
  padding: 12px 8px; font-size: 11.5px; font-weight: 800; color: var(--tx-sub);
  display: flex; flex-direction: column; gap: 4px;
}
.gg-att-cal-summary b { font-size: 24px; color: var(--blue); }
.gg-att-cal-streak { color: #e03131; }
.gg-att-cal {
  flex: 1; background: #f8fbfe; border: 1px solid var(--card-border);
  border-radius: 14px; padding: 12px;
}
.gg-att-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; justify-items: center; }
.gg-att-cal-head-row { margin-bottom: 6px; }
.gg-att-cal-head-row span { font-size: 11.5px; font-weight: 900; color: var(--tx-sub); }
.gg-att-cal-head-row span.is-sun { color: #e03131; }
.gg-att-cal-cell {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--tx-sub);
  background: #eef2f8; border: 2px solid transparent;
}
.gg-att-cal-cell.is-empty { background: none; }
.gg-att-cal-cell.is-done { background: #d3f2dc; color: #2f9e4f; }
.gg-att-cal-cell.is-today { background: #fff; border-color: #2a6df4; color: #2a6df4; }
.gg-att-cal-cell.is-sun:not(.is-done):not(.is-today) { color: #e03131; }
.gg-att-cal-legend {
  flex: none; width: 110px;
  border: 1px solid var(--card-border); border-radius: 12px; background: #fff;
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
  font-size: 11px; font-weight: 800; color: var(--tx-sub);
}
.gg-att-cal-legend b { color: var(--tx); font-size: 12px; }
.gg-att-cal-legend span { display: flex; align-items: center; gap: 6px; }
.gg-att-cal-legend i {
  width: 16px; height: 16px; border-radius: 50%; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px;
}
.gg-att-lg-done { background: #2db14e; color: #fff; }
.gg-att-lg-today { border: 2px solid #2a6df4; background: #fff; }
.gg-att-lg-none { background: #eef2f8; }

@media (max-width: 700px) {
  .gg-att-cal-wrap { flex-direction: column; }
  .gg-att-cal-side, .gg-att-cal-legend { width: 100%; }
}
