/* ============================================================
 * 이벤트 페이지 전용 — attendance.html · ranking.html
 * DESIGN_SYSTEM.md §12. 일반 화면에서 불러오지 않는다.
 * 이미지 에셋: assets/events/*.png (3x 렌더, 표시 크기 = px ÷ 3)
 * ============================================================ */

.ev-main {
  position: relative;
  padding: 0 0 calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--space-7));
  background: var(--event-bg);
  color: var(--color-on-primary);
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.ev-main.has-fixed-bar {
  padding-bottom: calc(var(--bottom-bar-clear) + 96px);
}
.ev-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: 0 var(--space-4);
}

/* ---------- 히어로 ---------- */
.ev-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4) var(--space-2);
}
.ev-hero-icon { display: block; height: auto; }
.ev-deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  animation: ev-twinkle 2.8s ease-in-out infinite;
}
.ev-deco:nth-of-type(2n) { animation-delay: -1.2s; }
.ev-deco:nth-of-type(3n) { animation-delay: -2s; }
@keyframes ev-twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.82); }
}

/* 골드 금속 헤드라인 — 뒤 레이어(::after)가 외곽선·바닥 두께를 맡고
   앞 레이어가 금속 그라데이션 글자를 맡는다(background-clip 과 text-shadow 를 섞으면 탁해진다). */
.ev-headline {
  position: relative;
  z-index: 0;
  margin: var(--space-2) 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 9.6vw, 40px);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -1px;
}
/* 글자 채움은 자식 span 이 맡는다 — 부모 배경은 음수 z-index 외곽선 레이어보다 먼저 칠해져 가려진다. */
.ev-headline > span {
  color: transparent;
  background: var(--event-gold-metal);
  -webkit-background-clip: text;
  background-clip: text;
}
.ev-headline::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--event-ink);
  -webkit-text-stroke: 7px var(--event-ink);
  text-shadow: 0 4px 0 var(--event-ink), 0 8px 14px rgba(4,26,84,0.45);
}
.ev-headline > .ev-headline-white {
  background: linear-gradient(180deg, var(--color-on-primary) 0%, var(--color-primary-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.ev-sub {
  margin: var(--space-2) 0 0;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-on-primary);
  opacity: .92;
}

/* ---------- 카드 ---------- */
.ev-card {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--event-card-bg);
  border: 2px solid var(--event-card-border);
  box-shadow: var(--event-card-bevel), var(--event-shadow-3d);
  color: var(--color-text);
}
.ev-card-title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  color: var(--color-primary-deep);
}

/* 체크 아이콘 조건 목록 */
.ev-rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.ev-rules li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-2);
  align-items: start;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-sub);
}
.ev-rules b { color: var(--color-primary-deep); }
.ev-check {
  width: 22px; height: 22px;
  border-radius: var(--radius-full);
  background: var(--event-gold-metal);
  border: 1.5px solid var(--event-gold-rim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  position: relative;
}
.ev-check::after {
  content: '';
  position: absolute;
  left: 7px; top: 3.5px;
  width: 5px; height: 10px;
  border: solid var(--event-ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- 리본 타이틀 ---------- */
.ev-ribbon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  margin-bottom: calc(-1 * var(--space-1));
}
.ev-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  height: 58px;
  padding-bottom: 6px;
  border-style: solid;
  border-width: 0 46px;
  border-image: url(../assets/events/ribbon.png) 0 180 fill / 0 46px / 0 stretch;
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  color: var(--color-on-primary);
  text-shadow: 0 2px 0 var(--event-ink);
  white-space: nowrap;
}
.ev-ribbon-row img { flex: none; }

/* ---------- 골드 CTA (이벤트 한정 예외, §12) ---------- */
.ev-cta-gold {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 60px;
  padding: var(--space-3) var(--space-5);
  border-radius: 18px;
  border: 2px solid var(--event-cta-gold-border);
  background: var(--event-cta-gold);
  box-shadow: var(--event-cta-gold-shadow);
  color: var(--event-cta-gold-text);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, filter .15s ease;
}
.ev-cta-gold::before {
  content: '';
  position: absolute;
  left: 6px; right: 6px; top: 3px;
  height: 45%;
  border-radius: 14px 14px 40% 40% / 14px 14px 12px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.1));
  pointer-events: none;
}
.ev-cta-gold > * { position: relative; }
.ev-cta-gold:hover { filter: brightness(1.05); text-decoration: none; }
.ev-cta-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--event-cta-gold-border); }
.ev-cta-gold:focus-visible { outline: 3px solid var(--color-on-primary); outline-offset: 3px; }
.ev-cta-gold:disabled,
.ev-cta-gold.is-disabled {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 4px 0 var(--color-border);
  color: var(--color-text-muted);
  text-shadow: none;
  cursor: default;
  filter: none;
  transform: none;
}
.ev-cta-gold .ev-cta-icon { width: 34px; height: auto; margin: -6px 0; }
.ev-cta-gold.sm { min-height: 44px; font-size: var(--text-base); border-radius: 14px; padding: var(--space-2) var(--space-4); width: auto; }

.ev-footnote {
  margin: 0;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-on-primary);
  opacity: .78;
}

/* ---------- 상태 카드 (비활성·없음) ---------- */
.ev-empty {
  text-align: center;
  padding: var(--space-6) var(--space-4);
}
.ev-empty img { display: block; width: 72px; height: auto; margin: 0 auto var(--space-2); }
.ev-empty-title { font-size: var(--text-lg); font-weight: var(--weight-black); color: var(--color-primary-deep); }
.ev-empty-desc { margin-top: var(--space-1); font-size: var(--text-sm); color: var(--color-text-sub); }

/* ============================================================
 * 출석체크
 * ============================================================ */
.att-milestones {
  display: grid;
  grid-template-columns: repeat(var(--ms-count, 4), minmax(0, 1fr));
  gap: var(--space-2);
}
.att-ms {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-4) var(--space-1) var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--event-card-bg);
  border: 2px solid var(--event-card-border);
  box-shadow: var(--event-card-bevel), 0 3px 0 var(--event-ink);
  color: var(--color-primary-deep);
  text-align: center;
}
.att-ms-count { font-size: var(--text-xl); font-weight: var(--weight-black); line-height: 1; }
.att-ms-count small { font-size: var(--text-sm); margin-left: 1px; }
.att-ms-points {
  margin-top: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--event-chip-bg);
  color: var(--event-chip-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  white-space: nowrap;
}
.att-ms.is-final {
  background: var(--event-gold-metal);
  border-color: var(--event-gold-rim);
  color: var(--event-ink);
}
.att-ms.is-final .att-ms-points { background: var(--event-ink); color: var(--color-gold-soft); }
.att-ms-crown {
  position: absolute;
  top: -18px; left: 50%;
  width: 34px; height: auto;
  transform: translateX(-50%) rotate(-8deg);
}
.att-ms.is-done::after {
  content: '받음';
  position: absolute;
  top: -9px; right: -4px;
  border: 1.5px solid var(--color-bg);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 10px;
  font-weight: var(--weight-black);
}
.att-ms.is-final.is-done::after { background: var(--event-ink); }

.att-status-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.att-streak { font-size: var(--text-base); font-weight: var(--weight-black); color: var(--color-primary-deep); }
.att-streak b { font-size: var(--text-2xl); color: var(--color-primary); }
.att-period { font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; }

.att-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.att-cell {
  position: relative;
  aspect-ratio: 1 / 1.08;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.att-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
}
.att-cell.is-future img { opacity: .55; filter: saturate(.6); }
.att-cell.is-missed img { opacity: .9; }
.att-num {
  position: absolute;
  top: -4px; left: -3px;
  z-index: 1;
  min-width: 17px;
  padding: 0 3px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1px solid var(--event-card-border);
  font-size: 10px;
  font-weight: var(--weight-black);
  color: var(--color-primary-deep);
  line-height: 15px;
  text-align: center;
}
.att-cell.is-checked .att-num { background: var(--event-ink); border-color: var(--color-gold); color: var(--color-gold-soft); }
.att-cell.is-defended .att-num { background: var(--color-gold-soft); border-color: var(--event-gold-rim); color: var(--event-ink); }
.att-cell.is-future .att-num { color: var(--color-text-muted); }
.att-tag {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: var(--weight-black);
  line-height: 1.4;
  white-space: nowrap;
}
.att-cell.is-missed .att-tag { background: var(--color-accent); color: var(--color-on-primary); }
.att-cell.is-today .att-tag { background: var(--color-primary); color: var(--color-on-primary); }
.att-cell.is-today::before {
  content: '';
  position: absolute;
  inset: 1px 1px 6%;
  border-radius: 24%;
  box-shadow: var(--event-glow);
  animation: att-pulse 1.6s ease-in-out infinite;
}
@keyframes att-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.att-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-sub);
}
.att-legend span { display: inline-flex; align-items: center; gap: 4px; }
.att-legend img { width: 18px; height: 18px; }

/* 도장 찍기 */
.att-cell.is-stamping img {
  animation: att-stamp .55s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes att-stamp {
  0% { transform: scale(2.2) rotate(-14deg); opacity: 0; }
  55% { transform: scale(.88) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.att-burst {
  position: absolute;
  left: 50%; top: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  z-index: 2;
  pointer-events: none;
  animation: att-burst .7s ease-out forwards;
}
@keyframes att-burst {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}

/* 도전 카드 */
.att-challenge {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-3);
  align-items: center;
}
.att-challenge img { width: 72px; height: auto; }
.att-challenge-title { font-size: var(--text-lg); font-weight: var(--weight-black); color: var(--color-primary-deep); }
.att-challenge-desc { margin-top: 2px; font-size: var(--text-sm); color: var(--color-text-sub); }
.att-challenge-desc b { color: var(--color-primary); }

.att-fill {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--event-glass);
  border: 1.5px solid var(--color-gold);
  color: var(--color-on-primary);
  font-size: var(--text-sm);
  text-decoration: none;
}
.att-fill img { width: 40px; height: auto; flex: none; }
.att-fill-text { flex: 1; min-width: 0; line-height: 1.4; }
.att-fill-text b { color: var(--color-gold-soft); }
.att-fill-go { flex: none; font-weight: var(--weight-black); color: var(--color-gold-soft); white-space: nowrap; }
.att-fill:hover { text-decoration: none; filter: brightness(1.1); }

/* 보상 팝업 */
.ev-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.ev-modal[hidden] { display: none; }
.ev-modal-backdrop { position: absolute; inset: 0; background: var(--event-glass); backdrop-filter: blur(2px); }
.ev-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: var(--space-7) var(--space-5) var(--space-5);
  border-radius: 26px;
  background: var(--event-bg);
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-lg);
  text-align: center;
  color: var(--color-on-primary);
  animation: ev-pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes ev-pop {
  0% { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.ev-modal-gift { width: 120px; height: auto; margin: -64px auto 0; display: block; }
.ev-modal-title { margin-top: var(--space-2); font-size: var(--text-2xl); }
.ev-modal-points {
  margin: var(--space-2) 0 var(--space-1);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  color: var(--color-gold-soft);
  text-shadow: 0 2px 0 var(--event-ink);
}
.ev-modal-desc { margin: 0 0 var(--space-5); font-size: var(--text-sm); opacity: .9; }

/* ============================================================
 * 랭킹전
 * ============================================================ */
.rk-emblem { width: 168px; height: auto; margin-bottom: calc(-1 * var(--space-3)); }
.rk-period {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--event-glass);
  border: 1.5px solid var(--color-gold-soft);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.rk-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.rk-countdown-digits {
  display: inline-flex;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.rk-countdown-digits span {
  min-width: 34px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  background: var(--event-ink);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-soft);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  text-align: center;
}
.rk-status-chip {
  display: inline-block;
  margin-top: var(--space-3);
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--event-chip-bg);
  color: var(--event-chip-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
}

.rk-top3-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}
.rk-top3-title .ev-headline { margin: 0; font-size: clamp(30px, 9vw, 38px); }
.rk-top3-title img { width: 40px; height: auto; }

.rk-podium {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: end;
  margin: 0 calc(-1 * var(--space-1));
}
.rk-spot { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.rk-spot-who {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 4px var(--space-1);
  text-align: center;
}
.rk-spot-avatar { position: relative; width: 64px; }
.rk-spot.is-1 .rk-spot-avatar { width: 84px; }
.rk-spot-avatar > img:first-child { width: 100%; height: auto; display: block; }
.rk-spot-medal {
  position: absolute;
  right: -10px; bottom: -6px;
  width: 30px; height: auto;
}
.rk-spot.is-1 .rk-spot-medal { width: 36px; }
.rk-spot.is-1 .rk-spot-crown {
  position: absolute;
  top: -26px; left: 50%;
  width: 44px; height: auto;
  transform: translateX(-50%);
}
.rk-spot-name {
  max-width: 100%;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-spot-score { font-size: var(--text-xs); opacity: .85; }
.rk-spot-points {
  margin-top: 2px;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--event-chip-bg);
  color: var(--event-chip-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  white-space: nowrap;
}
.rk-spot.is-empty .rk-spot-avatar > img:first-child { opacity: .35; filter: grayscale(1); }
.rk-spot.is-empty .rk-spot-name { opacity: .7; font-weight: var(--weight-bold); }
.rk-spot-base { width: 100%; height: auto; display: block; }

.rk-list-card { padding: var(--space-3) var(--space-3) var(--space-2); }
.rk-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-1) var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  color: var(--color-primary-deep);
}
.rk-list-head small { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-text-muted); }
.rk-list { margin: 0; padding: 0; list-style: none; }
.rk-row {
  display: grid;
  grid-template-columns: 30px 40px minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) var(--space-1);
  border-top: 1px solid var(--color-border);
}
.rk-row:first-child { border-top: 0; }
.rk-row.is-me {
  margin: 0 calc(-1 * var(--space-1));
  padding-left: var(--space-2);
  padding-right: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  border-top-color: transparent;
}
.rk-row.is-me + .rk-row { border-top-color: transparent; }
.rk-rank {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--gradient-point);
  border: 1.5px solid var(--color-gold);
  color: var(--color-on-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
}
.rk-row img { width: 40px; height: 40px; display: block; }
.rk-name { min-width: 0; }
.rk-name-text {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-name-score { font-size: var(--text-xs); color: var(--color-text-sub); }
.rk-me-mark {
  margin-left: 4px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 10px;
  vertical-align: 1px;
}
.rk-points {
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--event-chip-bg);
  color: var(--event-chip-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  white-space: nowrap;
}
.rk-list-empty { padding: var(--space-4) 0; text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); }

.rk-how-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.rk-how-head img { width: 44px; height: auto; }
.rk-how-head .ev-card-title { margin: 0; }
.rk-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  text-align: center;
}
.rk-formula em { font-style: normal; color: var(--color-primary); font-size: var(--text-lg); }
.rk-formula-sub { flex-basis: 100%; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-text-sub); }
.rk-rate-table { width: 100%; margin-top: var(--space-3); border-collapse: collapse; font-size: var(--text-sm); }
.rk-rate-table th, .rk-rate-table td { padding: var(--space-2); text-align: center; border-bottom: 1px solid var(--color-border); }
.rk-rate-table th { font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-text-muted); }
.rk-rate-table td:first-child { font-weight: var(--weight-black); color: var(--color-primary-deep); }
.rk-rate-table td:last-child { font-weight: var(--weight-black); color: var(--event-chip-text); }
.rk-how-notes { margin: var(--space-3) 0 0; padding-left: var(--space-4); font-size: var(--text-xs); color: var(--color-text-sub); line-height: 1.6; }

/* 내 순위 고정 바 */
.rk-mybar[hidden] { display: none; }
.rk-mybar {
  position: fixed;
  left: 50%;
  bottom: var(--bottom-bar-clear);
  transform: translateX(-50%);
  width: calc(100% - var(--space-4) * 2);
  max-width: calc(var(--container-max) - var(--space-4) * 2);
  z-index: calc(var(--z-nav) - 1);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border-radius: 20px;
  background: var(--gradient-point);
  border: 1.5px solid var(--color-gold);
  box-shadow: var(--shadow-lg);
  color: var(--color-on-primary);
}
.rk-mybar img.rk-mybar-avatar { width: 40px; height: 40px; flex: none; }
.rk-mybar-text { flex: 1; min-width: 0; line-height: 1.3; }
.rk-mybar-label { font-size: var(--text-xs); opacity: .8; }
.rk-mybar-main { font-size: var(--text-base); font-weight: var(--weight-black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-mybar-main b { color: var(--color-gold-soft); }
.rk-mybar .ev-cta-gold.sm { flex: none; }

@media (min-width: 768px) {
  .ev-wrap { padding: 0 var(--space-6); }
  .ev-hero { padding-top: var(--space-7); }
  .att-grid { gap: 8px; }
  .att-num { font-size: 11px; line-height: 17px; min-width: 20px; }
}

/* 좁은 폭 · 큰 글씨(안드로이드 텍스트 크기 130~160%) 대응 — 뷰포트가 아니라 카드 폭 기준으로 접는다 */
.att-ms-wrap, .rk-list-card { container-type: inline-size; }
.att-ms-count { white-space: nowrap; }
@container (max-width: 330px) {
  .att-milestones { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-5); }
}
@container (max-width: 300px) {
  .rk-row { grid-template-columns: 28px 36px minmax(0, 1fr); row-gap: 2px; }
  .rk-row img { width: 36px; height: 36px; }
  .rk-points { grid-column: 3; justify-self: start; }
}
/* 출석 칸 번호 — 칸이 작아지면 같이 줄여 도장을 덮지 않게 한다 */
.att-grid { container-type: inline-size; }
@container (max-width: 300px) {
  .att-num { font-size: 8px; line-height: 12px; min-width: 13px; padding: 0 2px; top: -3px; left: -2px; }
  .att-tag { font-size: 8px; padding: 0 3px; }
}
