/* =========================================================
 * 이상형 월드컵 (idealcup) — Trading Card Edition
 * 의존: renewal/css/common.css 의 :root 토큰
 * ========================================================= */

 .screen {
  min-height: auto !important;
 }

@font-face {
  font-family: 'Yanolja';
  src: url('https://gcore.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/YanoljaYacheR.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Binggre';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/Binggrae.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Binggre';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2110@1.0/Binggrae-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* 인트로 · 리빌 타이틀 — Binggre Bold */
.ic-intro__title,
.ic-reveal__title {
  font-family: 'Binggre', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-weight: 700;
  word-break: keep-all;
  letter-spacing: -0.02em;
}

/* 섹션 대형 타이틀 (파이널) — Yanolja */
.ic-final__title {
  font-family: 'Yanolja', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-weight: normal;
  letter-spacing: -0.02em;
}

/* 장식 기호(✦ ♥ 등) — Yanolja/Binggre 에 글리프 없음 → UI 본문 폰트 */
.ic-ornament,
.ic-btn__ico,
.ic-reveal-card__rune::before,
.ic-reveal-card__rune::after,
.ic-card__back-rune::before,
.ic-card__back-rune::after,
.ic-card__title::before,
.ic-card__title::after,
.ic-final-card__title::before,
.ic-final-card__title::after,
.ic-card__desc::before,
.ic-card__desc::after,
.ic-final-card__desc::before,
.ic-final-card__desc::after,
.ic-reveal-card.side-M .ic-reveal-card__badge::before,
.ic-reveal-card.side-S .ic-reveal-card__badge::before,
.ic-game__caption::before,
.ic-game__caption::after,
.ic-result__headline::before,
.ic-result__headline::after,
.ic-result__summary-label,
.ic-result__share-label,
.ic-result__events {
  font-family: var(--ic-font-ui);
}

.idealcup,
.idealcup * { box-sizing: border-box; }

.idealcup {
  /* 브랜드 */
  --ic-brand: var(--brand-primary, #3247fa);
  --ic-brand-hover: var(--brand-primary-hover, #2a3de8);
  --ic-brand-soft: #e9ecff;
  --ic-brand-deep: #1d2db5;
  --ic-pink: #ff3d8a;
  --ic-pink-soft: #ffe6f0;
  --ic-pink-deep: #c41e6b;
  --ic-purple: #6b21a8;
  --ic-violet: #4c1d95;
  --ic-gold: #ffd84d;
  --ic-gold-deep: #e0a82e;
  --ic-gold-light: #fff1a8;

  /* 기본 */
  --ic-font-ui: var(--second-family, "Pretendard"), "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  --ic-ink: #111827;
  --ic-ink-sub: #6b7280;
  --ic-line: rgba(15, 23, 42, 0.08);
  --ic-bg: #f8f9ff;
  --ic-surface: #ffffff;

  --ic-radius-lg: 5%;
  --ic-radius-md: 4%;
  --ic-radius-sm: 3%;

  --ic-shadow-card: 0 12px 32px rgba(50, 71, 250, 0.12);
  --ic-shadow-pop:  0 22px 50px rgba(76, 29, 149, 0.32);
  --ic-shadow-gold: 0 14px 36px rgba(224, 168, 46, 0.35);
  --ic-shadow-soft: 0 6px 18px rgba(17, 24, 39, 0.06);
  --ic-card-reveal-duration: 0.34s;

  font-family: var(--second-family, "Pretendard"), "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ic-ink);
  min-height: 60vh;
  padding: 56px 20px 96px;
  position: relative;
  overflow: hidden;

  /* 드리미 배경 (별·웨이브 포함 단일 BG) */
  background:
    url('/renewal/img/idealcup/bg-pastel.png') center center / cover no-repeat,
    linear-gradient(180deg, #f0e8ff 0%, #ffe8f2 100%);
  background-attachment: scroll;
}

/* 중앙 콘텐츠 가독용 — 배경 디테일은 유지, 과한 화이트 마스크 제거 */
.idealcup::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 70% at 50% 42%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.38) 100%);
  z-index: 0;
}

/* 떠다니는 데코 (하트·별·오브) */
.ic-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.ic-deco__item {
  position: absolute;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  will-change: transform;
  filter: drop-shadow(0 8px 24px rgba(107, 33, 168, 0.22));
}
.ic-deco__item--heart {
  background-image: url('/renewal/img/idealcup/deco-heart.png');
}
.ic-deco__item--star {
  background-image: url('/renewal/img/idealcup/deco-star.png');
}
.ic-deco__item--orb {
  background-image: url('/renewal/img/idealcup/deco-orb.png');
}

.ic-deco__item--a1 { width: 124px; height: 124px; left: 1%;  top: 8%;  animation: ic-deco-drift-a 14s ease-in-out infinite, ic-deco-twinkle 5s ease-in-out infinite; animation-delay: 0s, 0s; }
.ic-deco__item--a2 { width: 108px; height: 108px; left: 76%; top: 6%;  animation: ic-deco-drift-b 12s ease-in-out infinite, ic-deco-twinkle 4.5s ease-in-out infinite; animation-delay: -2s, -1s; }
.ic-deco__item--a3 { width: 76px;  height: 76px;  left: 82%; top: 40%; animation: ic-deco-drift-c 11s ease-in-out infinite; animation-delay: -4s; }
.ic-deco__item--a4 { width: 118px; height: 118px; left: 2%;  top: 60%; animation: ic-deco-drift-b 15s ease-in-out infinite, ic-deco-twinkle 6s ease-in-out infinite; animation-delay: -1s, -2.5s; }
.ic-deco__item--a5 { width: 102px; height: 102px; left: 70%; top: 70%; animation: ic-deco-drift-a 13s ease-in-out infinite, ic-deco-twinkle 5.2s ease-in-out infinite; animation-delay: -5s, -3s; }

@keyframes ic-deco-drift-a {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50%      { transform: translate(14px, -22px) rotate(5deg); }
}
@keyframes ic-deco-drift-b {
  0%, 100% { transform: translate(0, 0) rotate(3deg); }
  50%      { transform: translate(-16px, 18px) rotate(-6deg); }
}
@keyframes ic-deco-drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(10px, 12px) scale(1.06); }
  66%      { transform: translate(-8px, -14px) scale(0.94); }
}
@keyframes ic-deco-twinkle {
  0%, 100% { opacity: 0.72; }
  50%      { opacity: 1; }
}

.idealcup > .ic-step,
.idealcup > script { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .ic-deco__item {
    animation: none !important;
    opacity: 0.65;
  }
}

.idealcup_container .idealcup { margin: 0 auto; min-height: 64vh; }

/* ── 스텝 토글 ── */
.ic-step { display: none; animation: ic-fade .45s ease both; }
.ic-step.is-active { display: block; }
@keyframes ic-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 공통 버튼 ── */
.ic-btn {
  appearance: none; border: 0; cursor: pointer;
  font: 700 16px/1 var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  padding: 14px 28px; border-radius: 999px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, opacity .2s ease;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; letter-spacing: -0.01em;
}
.ic-btn:disabled { opacity: .45; cursor: not-allowed; }
.ic-btn__ico { font-size: 16px; }
.ic-btn--primary {
  background: linear-gradient(135deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(50, 71, 250, 0.35);
}
.ic-btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(50, 71, 250, 0.45); }
.ic-btn--ghost {
  background: #fff; color: var(--ic-ink);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 4px 14px rgba(17,24,39,0.08);
  padding: 12px 24px;
}
.ic-btn--ghost:hover { background: #fafbff; transform: translateY(-1px); }
.ic-btn--ghost .ic-btn__ico {
  font-size: 18px;
  color: var(--ic-ink);
  opacity: .65;
  transition: transform .4s ease;
  display: inline-block;
}
.ic-btn--ghost:hover .ic-btn__ico { transform: rotate(-180deg); opacity: 1; }
.ic-btn--lg { padding: 18px 40px; font-size: 18px; }

.ic-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700;
  color: var(--ic-brand); background: var(--ic-brand-soft);
  padding: 7px 14px; border-radius: 999px;
}

/* =========================================================
 * STEP 1 — 인트로 (타이틀 제외 문구 스타일)
 * ========================================================= */
.ic-intro {
  position: relative;
  text-align: center;
  padding: 40px 20px 80px;
}

.ic-intro__inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

/* 방송/채널 뱃지 */
.ic-intro__brand {
  display: inline-block;
  margin: 0 0 20px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(135deg, var(--ic-brand-deep) 0%, var(--ic-violet) 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(50, 71, 250, 0.28);
}

.ic-intro__title {
  font-size: 60px;
  line-height: 1.05;
  margin: 0 0 22px;
  color: var(--ic-ink);
}

.ic-intro__title em {
  font-style: normal;
  font-weight: 700;
  background: linear-gradient(120deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 한 줄 카피 — 인용 카드 */
.ic-intro__sub {
  position: relative;
  max-width: 500px;
  margin: 0 auto 26px;
  padding: 20px 28px 20px 32px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: #1e1b4b;
  text-align: center;
  word-break: keep-all;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(233, 236, 255, 0.88) 55%,
    rgba(255, 230, 240, 0.82) 100%
  );
  border: 1px solid rgba(50, 71, 250, 0.14);
  border-radius: 18px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.8) inset,
    0 12px 32px rgba(50, 71, 250, 0.1);
}

.ic-intro__sub::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  left: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--ic-pink);
  opacity: 0.35;
  pointer-events: none;
}

.ic-intro__sub::after {
  content: "\201D";
  position: absolute;
  right: 14px;
  bottom: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--ic-brand);
  opacity: 0.3;
  pointer-events: none;
}

.ic-intro__desc {
  max-width: 480px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ic-ink);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  border: 1px dashed rgba(50, 71, 250, 0.2);
}

/* 진행 정보 pill */
.ic-intro__meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 28px;
}

.ic-intro__meta .ic-pill {
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ic-ink);
  background: #fff;
  border: 1px solid rgba(50, 71, 250, 0.12);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
}

.ic-intro__meta .ic-pill strong {
  font-weight: 800;
  color: var(--ic-brand);
}

.ic-intro__meta .ic-pill--count {
  background: linear-gradient(180deg, #fff 0%, var(--ic-brand-soft) 100%);
  color: var(--ic-brand-deep);
}

.ic-intro__meta .ic-pill--flow {
  background: linear-gradient(180deg, #fff 0%, var(--ic-pink-soft) 100%);
  color: var(--ic-pink-deep);
}

.ic-intro__meta .ic-pill__arrow {
  display: inline-block;
  margin: 0 1px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ic-pink);
  opacity: 0.85;
}

/* CTA */
.ic-intro__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.ic-intro__name-input {
  width: min(100%, 300px);
  padding: 14px 16px;
  border: 2px solid rgba(50, 71, 250, 0.2);
  border-radius: 14px;
  font-size: 16px;
  font-family: var(--ic-font-ui);
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 16px rgba(50, 71, 250, 0.08);
}

.ic-intro__name-input:focus {
  outline: none;
  border-color: var(--ic-brand, #3247fa);
  box-shadow: 0 0 0 3px rgba(50, 71, 250, 0.15);
}

.ic-intro__name-input::placeholder {
  color: #aab0be;
}

.ic-intro__start {
  min-width: min(100%, 300px);
  padding-left: 36px;
  padding-right: 36px;
  box-shadow:
    0 10px 28px rgba(50, 71, 250, 0.35),
    0 0 0 4px rgba(255, 255, 255, 0.55);
}

.ic-intro__start .ic-btn__ico {
  animation: ic-intro-sparkle 2.4s ease-in-out infinite;
}

@keyframes ic-intro-sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.65; transform: scale(1.15); }
}

.ic-intro__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ic-deco-bubble {
  position: absolute;
  display: inline-block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ic-brand);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(50, 71, 250, 0.1);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ic-deco-bubble:nth-child(1) {
  transform: rotate(-6deg);
  animation: ic-float-a 3.5s ease-in-out infinite;
}

.ic-deco-bubble:nth-child(2) {
  transform: rotate(5deg);
  animation: ic-float-b 3.8s ease-in-out 0.8s infinite;
}

.ic-deco-bubble:nth-child(3) {
  transform: rotate(3deg);
  animation: ic-float-c 4s ease-in-out 1.5s infinite;
}

/* PC — 말풍선을 인트로 본문(중앙 640px대) 주변에 배치 */
@media (min-width: 768px) {
  .ic-intro__deco {
    left: 50%;
    right: auto;
    width: min(100%, 700px);
    max-width: 700px;
    transform: translateX(-50%);
  }

  .ic-deco-bubble:nth-child(1) {
    top: 28px;
    left: 0;
    right: auto;
  }

  .ic-deco-bubble:nth-child(2) {
    top: 100px;
    right: 0;
    left: auto;
  }

  .ic-deco-bubble:nth-child(3) {
    top: 46%;
    bottom: auto;
    left: 4%;
    right: auto;
  }
}

@keyframes ic-float-a {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-8px) rotate(-6deg); }
}

@keyframes ic-float-b {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50%      { transform: translateY(-8px) rotate(5deg); }
}

@keyframes ic-float-c {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.ic-deco-bubble--pink {
  color: var(--ic-pink) !important;
  border-color: rgba(255, 61, 138, 0.18);
  background: linear-gradient(180deg, #fff 0%, var(--ic-pink-soft) 100%);
}

.ic-deco-bubble--blue {
  color: var(--ic-brand) !important;
  border-color: rgba(50, 71, 250, 0.18);
  background: linear-gradient(180deg, #fff 0%, var(--ic-brand-soft) 100%);
}

/* =========================================================
 * 🎴 트레이딩 카드 — 공통 베이스
 *    .ic-reveal-card / .ic-card / .ic-final-card 가 공유
 * ========================================================= */

/* 매치 & FINAL 카드: 세로형 카드 (가로 썸네일 + 하단 정보) */
.ic-card,
.ic-final-card {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  aspect-ratio: 5 / 7;
  width: 100%;
  max-width: 420px;
  outline: none;
}

/* 리빌 카드 — 12장 그리드용 세로 썸네일 */
.ic-reveal-card {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: default;
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  min-height: 128px;
  outline: none;
  opacity: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  contain: layout style;
}

.ic-reveal-card__inner,
.ic-card__inner,
.ic-final-card__inner {
  position: absolute;
  inset: 0;
  transform: none;
  transform-style: flat;
}

/* face 공통 — 3D 플립 대신 앞·뒤 crossfade + scale (모바일에서 덜 버벅임) */
.ic-reveal-card__back, .ic-reveal-card__front,
.ic-card__face,
.ic-final-card__face {
  position: absolute;
  inset: 0;
  border-radius: var(--ic-radius-lg);
  overflow: hidden;
  transition:
    opacity var(--ic-card-reveal-duration) ease,
    transform var(--ic-card-reveal-duration) cubic-bezier(.22, .88, .28, 1),
    visibility var(--ic-card-reveal-duration) ease;
}

.ic-reveal-card__back,
.ic-card__face--back,
.ic-final-card__face--back {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.ic-reveal-card__front,
.ic-card__face--front,
.ic-final-card__face--front {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  z-index: 1;
  pointer-events: none;
}

.ic-reveal-card.is-flipped .ic-reveal-card__back,
.ic-card.is-flipped .ic-card__face--back,
.ic-final-card.is-flipped .ic-final-card__face--back {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94);
  z-index: 1;
  pointer-events: none;
}

.ic-reveal-card.is-flipped .ic-reveal-card__front,
.ic-card.is-flipped .ic-card__face--front,
.ic-final-card.is-flipped .ic-final-card__face--front {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
  pointer-events: auto;
}

/* =========================================================
 * 🎴 카드 뒷면 (타로 모티프) — 공통
 * ========================================================= */
.ic-reveal-card__back,
.ic-card__face--back,
.ic-final-card__face--back {
  background:
    radial-gradient(circle at 50% 32%, rgba(255,216,77,0.40) 0%, transparent 55%),
    radial-gradient(circle at 50% 90%, rgba(255,61,138,0.30) 0%, transparent 60%),
    linear-gradient(160deg, #1e1b4b 0%, var(--ic-violet) 45%, #831843 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,216,77,.3),
    inset 0 0 24px rgba(0,0,0,.25),
    var(--ic-shadow-pop);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.ic-reveal-card__back::before,
.ic-card__face--back::before,
.ic-final-card__face--back::before {
  content: "";
  position: absolute;
  inset: clamp(8px, 5%, 14px);
  border: 1px solid rgba(255,216,77,.5);
  border-radius: 4%;
  pointer-events: none;
}
.ic-reveal-card__back::after,
.ic-card__face--back::after,
.ic-final-card__face--back::after {
  content: "";
  position: absolute;
  inset: clamp(14px, 8%, 20px);
  border: 1px dashed rgba(255,216,77,.22);
  border-radius: 3%;
  pointer-events: none;
}

/* 뒷면 텍스트 */
.ic-reveal-card__brand,
.ic-reveal-card__bottom-brand,
.ic-card__back-brand,
.ic-card__back-bottom {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(8px, 1vw, 10px);
  letter-spacing: .32em;
  color: rgba(255,216,77,.85);
  font-weight: 800;
}
.ic-reveal-card__brand,
.ic-card__back-brand    { top: clamp(16px, 6%, 26px); }
.ic-reveal-card__bottom-brand,
.ic-card__back-bottom   {
  bottom: clamp(16px, 6%, 26px);
  color: rgba(255,216,77,.55);
  transform: rotate(180deg);
}

.ic-reveal-card__rune,
.ic-card__back-rune,
.ic-final-card__back-rune {
  position: relative;
  font-family: "Times New Roman", serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(34px, 9vw, 90px);
  color: #ffd84d;
  text-shadow:
    0 0 20px rgba(255,216,77,.7),
    0 0 40px rgba(255,216,77,.35);
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1;
}
.ic-reveal-card__rune::before, .ic-reveal-card__rune::after,
.ic-card__back-rune::before, .ic-card__back-rune::after {
  content: "\2726";
  position: absolute;
  font-size: .25em;
  color: rgba(255,216,77,.85);
  text-shadow: 0 0 10px rgba(255,216,77,.6);
  font-style: normal;
}
.ic-reveal-card__rune::before,
.ic-card__back-rune::before { top: -.5em; left: 50%; transform: translateX(-50%); }
.ic-reveal-card__rune::after,
.ic-card__back-rune::after  { bottom: -.3em; left: 50%; transform: translateX(-50%); }

.ic-final-card__back-rune small {
  display: block;
  font-size: .22em;
  letter-spacing: .3em;
  margin-top: 14px;
  color: rgba(255,216,77,.8);
  font-style: normal;
  font-family: var(--second-family, "Pretendard"), sans-serif;
  font-weight: 800;
}

/* =========================================================
 * 🎴 카드 앞면 — 트레이딩 카드 디자인
 * ========================================================= */

/* M (남자/좌) = 블루 톤 / S (시끌이/우) = 핑크 톤 */
.ic-card[data-side="left"],
.ic-reveal-card.side-M {
  --tc-accent: var(--ic-brand);
  --tc-accent-deep: var(--ic-brand-deep);
  --tc-accent-soft: var(--ic-brand-soft);
}
.ic-card[data-side="right"],
.ic-reveal-card.side-S {
  --tc-accent: var(--ic-pink);
  --tc-accent-deep: var(--ic-pink-deep);
  --tc-accent-soft: var(--ic-pink-soft);
}
.ic-final-card { --tc-accent: var(--ic-brand); --tc-accent-deep: var(--ic-brand-deep); --tc-accent-soft: var(--ic-brand-soft); }
.ic-final-card:nth-child(2) { --tc-accent: var(--ic-pink); --tc-accent-deep: var(--ic-pink-deep); --tc-accent-soft: var(--ic-pink-soft); }

/* 매치/FINAL 카드 앞면 — 상·하단 컬러 블록 + 가운데 가로 썸네일 프레임 */
.ic-card__face--front,
.ic-final-card__face--front {
  background: linear-gradient(180deg, var(--tc-accent, #3247fa) 0%, var(--tc-accent-deep, #1d2db5) 100%);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.12),
    0 18px 42px color-mix(in srgb, var(--tc-accent, #3247fa) 38%, transparent);
  transition:
    opacity var(--ic-card-reveal-duration) ease,
    transform var(--ic-card-reveal-duration) cubic-bezier(.22, .88, .28, 1),
    visibility var(--ic-card-reveal-duration) ease,
    box-shadow .18s ease,
    filter .22s ease;
}
/* 안쪽 입체감 — 상단 라이트 하이라이트 + 하단 다크 음영 + 가장자리 라인 */
.ic-card[data-side="left"] .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),         /* 상단 1px 하이라이트 */
    inset 0 -2px 0 rgba(0, 0, 0, 0.20),              /* 하단 1~2px 깊이 */
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),       /* 가장자리 1px 라이트 라인 */
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.18), /* 상단 안쪽 빛 */
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),    /* 하단 안쪽 그림자 */
    0 4px 14px rgba(15, 23, 42, 0.10),
    0 20px 48px rgba(50, 71, 250, 0.42);
}
.ic-card[data-side="right"] .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 0, 0, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.18),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 4px 14px rgba(15, 23, 42, 0.10),
    0 20px 48px rgba(255, 61, 138, 0.40);
}
.ic-final-card:nth-child(1) .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 0, 0, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.18),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 20px 48px rgba(50, 71, 250, 0.42);
}
.ic-final-card:nth-child(2) .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 0, 0, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.18),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 20px 48px rgba(255, 61, 138, 0.40);
}
.ic-final-card:nth-child(3) .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 0, 0, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.18),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 20px 48px rgba(50, 71, 250, 0.35);
}

/* hover */
.ic-card.is-flipped:hover .ic-card__face--front,
.ic-final-card.is-flipped:hover .ic-final-card__face--front {
  transform: scale(1) translateY(-6px);
}
.ic-card[data-side="left"].is-flipped:hover .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.22),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.30),
    0 26px 56px rgba(50, 71, 250, 0.5);
}
.ic-card[data-side="right"].is-flipped:hover .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.22),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.30),
    0 26px 56px rgba(255, 61, 138, 0.48);
}

/* =========================================================
 * 매치 카드 (.ic-card) — 세로형 (상단 3:2 썸네일 / 하단 정보)
 * ========================================================= */
.ic-card {
  width: 100%;
  margin: 0 auto;
  animation: ic-card-enter-pop .4s ease both;
}
.ic-card[data-side="left"]  { animation-delay: .05s; }
.ic-card[data-side="right"] { animation-delay: .15s; }
@keyframes ic-card-enter-pop {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 빈 요소 자동 숨김 */
.ic-card__label:empty,
.ic-card__desc:empty,
.ic-final-card__caption:empty { display: none; }

/* 상단 헤더 — 타이틀 영역 (카드 배경색) */
.ic-card__head,
.ic-final-card__head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px 14px;
  color: #fff;
  text-align: center;
}

/* 가운데: 가로 썸네일 (16:9) — 안쪽으로 살짝 들어간 액자 느낌 */
.ic-card__photo,
.ic-final-card__photo {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: calc(100% - 32px);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  box-shadow:
    /* 액자 프레임 — 안쪽 다크 라인 */
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    /* 상단 안쪽 그림자 (위에서 살짝 내려앉음) */
    inset 0 6px 12px -4px rgba(0, 0, 0, 0.38),
    /* 좌·우 안쪽 미세 그림자 */
    inset 6px 0 10px -6px rgba(0, 0, 0, 0.22),
    inset -6px 0 10px -6px rgba(0, 0, 0, 0.22),
    /* 하단 안쪽 하이라이트 */
    inset 0 -2px 0 rgba(255, 255, 255, 0.10),
    /* 외부 그림자 — 카드와 분리감 */
    0 6px 20px rgba(0, 0, 0, 0.22);
}
.ic-card__photo img,
.ic-final-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  object-fit: cover;
  object-position: center center;
  transform: none;
  display: block;
  z-index: 1;
}

.ic-reveal-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  object-fit: cover;
  object-position: center center;
  transform: none;
  display: block;
  z-index: 1;
}

/* 로드 실패 시 — padding 없이 프레임 안에 맞춤 */
.ic-card__photo img.is-img-error,
.ic-final-card__photo img.is-img-error,
.ic-reveal-card__photo img.is-img-error,
.ic-result__photo img.is-img-error {
  object-fit: contain;
  transform: none;
  background: #fde2e7;
}

/* 하단 푸터 — 설명 영역 (카드 배경색) */
.ic-card__foot,
.ic-final-card__foot {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 18px;
  min-height: 0;
}

/* 라벨 — 헤더 상단 소형 (있을 때만) */
.ic-card__label,
.ic-final-card__label {
  align-self: center;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* 타이틀 — 헤더 메인, 양옆 ✦ (Yanolja) */
.ic-card__title,
.ic-final-card__title {
  position: relative;
  display: block;
  margin: 0;
  color: #fff;
  font-family: 'Yanolja', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-size: 28px;
  font-weight: normal;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.35;
  padding: 0 22px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  word-break: keep-all;
}
.ic-card__title::before,
.ic-card__title::after,
.ic-final-card__title::before,
.ic-final-card__title::after {
  content: "\2726";
  position: absolute;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  top: 0.35em;
}
.ic-card__title::before,
.ic-final-card__title::before { left: 0; }
.ic-card__title::after,
.ic-final-card__title::after { right: 0; }

/* 설명 — 푸터 안쪽 패널 박스 */
.ic-card__desc,
.ic-final-card__desc {
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  width: calc(100% - 32px);
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: #fff;
  text-align: center;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 14px rgba(0, 0, 0, 0.12);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ic-card__desc::before,
.ic-card__desc::after,
.ic-final-card__desc::before,
.ic-final-card__desc::after {
  content: "\2726";
  position: absolute;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
}
.ic-card__desc::before,
.ic-final-card__desc::before { left: 10px; }
.ic-card__desc::after,
.ic-final-card__desc::after { right: 10px; }

/* =========================================================
 * 위너 선정 — 매치 / 파이널 공통
 * ========================================================= */
.ic-card__pick-stamp,
.ic-final-card__pick-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  max-width: 200px;
  aspect-ratio: 1;
  background: url('/renewal/img/idealcup/pick-stamp.svg') center / contain no-repeat;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(2.4) rotate(-16deg);
  filter: drop-shadow(0 8px 18px rgba(255, 216, 77, 0.55));
}

.ic-card.is-picked .ic-card__pick-stamp,
.ic-final-card.is-picked .ic-final-card__pick-stamp {
  animation: ic-stamp-down 0.65s cubic-bezier(0.4, 1.6, 0.3, 1) forwards;
}

@keyframes ic-stamp-down {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4) rotate(-16deg);
    filter: drop-shadow(0 16px 32px rgba(255, 216, 77, 0)) blur(2px);
  }
  38% {
    opacity: 0.96;
    transform: translate(-50%, -50%) scale(0.82) rotate(8deg);
    filter: drop-shadow(0 6px 16px rgba(255, 216, 77, 0.75)) blur(0);
  }
  58% { transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); }
  78% { transform: translate(-50%, -50%) scale(0.96) rotate(2deg); }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(-3deg);
    filter: drop-shadow(0 6px 14px rgba(255, 216, 77, 0.5));
  }
}

/* 사진 영역 플래시 */
.ic-card__photo::before,
.ic-final-card__photo::before {
  content: none;
}

.ic-card.is-picked .ic-card__photo::before,
.ic-final-card.is-picked .ic-final-card__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.65);
  z-index: 11;
  pointer-events: none;
  animation: ic-stamp-flash 0.32s ease-out forwards;
}

@keyframes ic-stamp-flash {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}

/* —— 매치: 승자 강조 (카드 입체 그림자 + 골드 링) —— */
.ic-card.is-picked .ic-card__face--front {
  transform: scale(1.03) translateY(-5px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.ic-card[data-side="left"].is-picked .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.26),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(255, 216, 77, 0.9),
    0 28px 56px rgba(50, 71, 250, 0.55),
    0 0 48px rgba(255, 216, 77, 0.32);
}

.ic-card[data-side="right"].is-picked .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.26),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(255, 216, 77, 0.9),
    0 28px 56px rgba(255, 61, 138, 0.52),
    0 0 48px rgba(255, 216, 77, 0.32);
}

/* —— 매치: 패자 흐림 —— */
.ic-card.is-faded {
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ic-card.is-faded .ic-card__face--front {
  filter: grayscale(0.65) brightness(0.9);
  transform: scale(0.97);
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 8px 24px rgba(15, 23, 42, 0.12);
}

/* 선정 중 hover 덮어쓰기 방지 */
.ic-card.is-picked.is-flipped:hover .ic-card__face--front,
.ic-card.is-faded.is-flipped:hover .ic-card__face--front {
  transform: scale(1.03) translateY(-5px);
}

.ic-card.is-faded.is-flipped:hover .ic-card__face--front {
  transform: scale(0.97);
}

.ic-card[data-side="left"].is-picked.is-flipped:hover .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.26),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(255, 216, 77, 0.9),
    0 28px 56px rgba(50, 71, 250, 0.55),
    0 0 48px rgba(255, 216, 77, 0.32);
}

.ic-card[data-side="right"].is-picked.is-flipped:hover .ic-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.26),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(255, 216, 77, 0.9),
    0 28px 56px rgba(255, 61, 138, 0.52),
    0 0 48px rgba(255, 216, 77, 0.32);
}

/* —— 파이널: 승자 / 패자 —— */
.ic-final-card.is-picked .ic-final-card__face--front {
  transform: scale(1.04) translateY(-6px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.26),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(255, 216, 77, 0.9),
    0 30px 58px color-mix(in srgb, var(--tc-accent) 48%, transparent),
    0 0 52px rgba(255, 216, 77, 0.35);
}

.ic-final-card.is-faded {
  opacity: 0.38;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ic-final-card.is-faded .ic-final-card__face--front {
  filter: grayscale(0.65) brightness(0.88);
  transform: scale(0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(15, 23, 42, 0.1);
}

.ic-final-card.is-picked.is-flipped:hover .ic-final-card__face--front,
.ic-final-card.is-faded.is-flipped:hover .ic-final-card__face--front {
  transform: scale(1.04) translateY(-6px);
}

.ic-final-card.is-faded.is-flipped:hover .ic-final-card__face--front {
  transform: scale(0.96);
}

/* 카드 전환: .is-flipped 토글 → 앞·뒤 crossfade */

/* =========================================================
 * 리빌 카드 (.ic-reveal-card) — 12명 그리드 (참고 시안)
 * ========================================================= */
/* 등장 — opacity 0 시작은 iOS·접근성(모션줄임)에서 카드 미노출 원인 */
.ic-reveal-card.is-deck-enter {
  opacity: 1;
  transform: translateY(14px) scale(0.98);
  animation: ic-reveal-enter .3s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 22ms);
}

.ic-reveal-card.is-entered {
  opacity: 1 !important;
  transform: translateY(0) scale(1) translateZ(0) !important;
  animation: none !important;
}

@keyframes ic-reveal-enter {
  from {
    opacity: 1;
    transform: translateY(14px) scale(0.98) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
  }
}

.ic-reveal-card__front {
  display: block;
  padding: 0;
  background: #0f0f1a;
  border: 2px solid var(--tc-accent, #3247fa);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 10px 28px rgba(50, 71, 250, 0.32);
}
.ic-reveal-card.side-S .ic-reveal-card__front {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 10px 28px rgba(255, 61, 138, 0.32);
}
.ic-reveal-card.is-flipped .ic-reveal-card__front {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45),
    0 12px 32px rgba(50, 71, 250, 0.35);
}

.ic-reveal-card.side-S.is-flipped .ic-reveal-card__front {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45),
    0 12px 32px rgba(255, 61, 138, 0.35);
}

.ic-reveal-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.ic-reveal-card.side-M .ic-reveal-card__badge::before {
  content: "\2726";
  font-style: normal;
}
.ic-reveal-card.side-S .ic-reveal-card__badge::before {
  content: "\2665";
  font-style: normal;
}

.ic-reveal-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #0f0f1a;
}
.ic-reveal-card__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 42%,
    rgba(0, 0, 0, 0.35) 72%,
    rgba(0, 0, 0, 0.72) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.ic-reveal-card__caption {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
  z-index: 3;
  margin: 0;
  padding: 0 4px;
  color: #fff;
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 700;
  line-height: 1.38;
  text-align: center;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  word-break: keep-all;
}

/* 공개 직후 짧은 글로우 */
.ic-reveal-card.is-flipped .ic-reveal-card__front,
.ic-card.is-flipped .ic-card__face--front {
  animation: ic-glow-ring .45s ease;
}
@keyframes ic-glow-ring {
  0%   { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
  50%  { filter: drop-shadow(0 0 10px rgba(255,255,255,.45)); }
  100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
}

/* =========================================================
 * STEP 1.5 — 리빌 단계 레이아웃
 * ========================================================= */
.ic-reveal { text-align: center; padding: 16px 0 48px; }
.ic-reveal__head { margin-bottom: 32px; }
.ic-reveal__chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  background: linear-gradient(135deg, #ff6b9d 0%, #ff3d8a 100%);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(255, 61, 138, 0.35);
}
.ic-reveal__title {
  font-size: clamp(30px, 4.2vw, 42px);
  margin: 0 0 10px;
  color: #1e1b4b;
}
.ic-reveal__title em {
  font-style: normal;
  font-weight: 700;
  background: linear-gradient(120deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ic-reveal__status {
  font-size: 14px;
  color: var(--ic-ink-sub);
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 1.5em;
  transition: color 0.3s ease;
}
.ic-reveal__status.is-done { color: var(--ic-brand); font-weight: 700; }

.ic-reveal__stage { position: relative; padding: 8px 0 40px; }
.ic-reveal__deck {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 8px;
  align-items: stretch;
}

/* iOS 구형 — aspect-ratio 미지원 시 카드 높이 확보 */
@supports not (aspect-ratio: 1) {
  .ic-reveal-card {
    height: 0;
    padding-top: 133.333%;
    min-height: 0;
  }
  .ic-reveal-card > .ic-reveal-card__inner {
    position: absolute;
    inset: 0;
    height: auto;
    padding-top: 0;
  }
}
.ic-reveal__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
  padding: 0 16px;
}
.ic-reveal__go {
  width: 100%;
  max-width: none;
  padding-left: 24px;
  padding-right: 24px;
}
.ic-reveal__actions .ic-btn--ghost {
  align-self: center;
  min-width: 120px;
  font-size: 15px;
}

/* =========================================================
 * STEP 2 — 토너먼트 (VS) 레이아웃
 * ========================================================= */
.ic-game { padding-top: 16px; }

.ic-game__head { text-align: center; margin-bottom: 24px; }
.ic-game__progress { display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.ic-game__round {
  font-size: 13px; font-weight: 800; letter-spacing: .14em;
  color: #fff;
  background: linear-gradient(135deg, #5b6cff 0%, #ff6b9d 100%);
  padding: 6px 18px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(91, 108, 255, 0.35);
}
.ic-game__match { font-size: 13px; font-weight: 700; color: var(--ic-ink); opacity: .65; }
.ic-game__progressbar {
  position: relative;
  width: min(420px, 80%);
  height: 6px;
  margin: 0 auto 18px;
  background: var(--ic-line);
  border-radius: 999px;
  overflow: hidden;
}
.ic-game__progressbar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: linear-gradient(90deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  width: 0%; border-radius: 999px; transition: width .35s ease;
}
.ic-game__caption {
  font-size: 24px; color: var(--ic-ink); margin: 0;
  line-height: 1.5; font-weight: 600;
  opacity: .75;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ic-game__caption::before,
.ic-game__caption::after {
  content: "\2726";
  color: var(--ic-pink);
  font-size: 12px;
  font-weight: 900;
}

.ic-game__arena {
  position: relative;
  max-width: 1180px;
  margin: 0 auto 20px;
}

.ic-vs-wrap {
  max-width: 100%;
  margin: 0 auto;
  /* padding-bottom: clamp(150px, 24vw, 260px); */
  width: 100%;
}

.ic-vs {
  display: grid;
  grid-template-columns: 1fr minmax(110px, 14vw) 1fr;
  gap: clamp(8px, 1.2vw, 18px);
  align-items: stretch;
  justify-items: center;
  margin-bottom: 20px;
}

.ic-vs > .ic-card {
  position: relative;
  z-index: 1;
}

/* 카드 사이 중앙 — VS + 마스코트 */
.ic-vs__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 240px;
  padding: 10px 8px 180px;
  align-self: stretch;
  position: relative;
  overflow: visible;
  z-index: 3;
  pointer-events: none;
}

.ic-vs__center * {
  pointer-events: none;
}

/* VS 디바이더 — 3D VS 이미지 */
.ic-vs__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  flex-shrink: 0;
}
.ic-vs__img {
  display: block;
  width: clamp(90px, 10vw, 150px);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 24px rgba(76, 29, 149, 0.32));
  animation: ic-vs-float 2.6s ease-in-out infinite;
}
@keyframes ic-vs-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-5px) scale(1.04); }
}

/* 마스코트 — PC: 대결 영역 하단 중앙 / MO: 처음부터 버튼 위 */
.ic-game__mascot {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: min(360px, 92vw);
  margin: 0;
  padding: 0 12px;
  pointer-events: none;
  z-index: 4;
  box-sizing: border-box;
}

.ic-game__mascot * {
  pointer-events: none;
}

.ic-game__mascot .ic-mascot {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 0;
}

.ic-mascot__figure {
  position: relative;
  flex: 0 0 auto;
  width: clamp(100px, 56vw, 200px);
  height: clamp(100px, 56vw, 200px);
  margin: 0;
  z-index: 2;
}

.ic-mascot__bubble {
  position: relative;
  width: max-content;
  min-width: 180px;
  max-width: min(300px, 44vw);
  margin: 0 0 14px;
  padding: 15px 24px 16px;
  text-align: center;
  z-index: 5;
  align-self: center;
 
  background: linear-gradient(165deg, #ffffff 0%, #f3f5ff 55%, #fff0f6 100%);
  border-radius: 24px;
  border: 2px solid var(--ic-brand);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.92),
    0 0 20px rgba(255, 61, 138, 0.12),
    0 7px 0 rgba(50, 71, 250, 0.07),
    0 16px 36px rgba(50, 71, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  isolation: isolate;
}

/* 말풍선 꼬리 — 아래(캐릭터 방향) */
.ic-mascot__bubble::before {
  content: "";
  position: absolute;
  top: auto;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 11px 0 11px;
  border-color: var(--ic-brand) transparent transparent transparent;
  filter: drop-shadow(0 3px 4px rgba(50, 71, 250, 0.15));
  font-size: 0;
}

.ic-mascot__bubble::after {
  content: "";
  position: absolute;
  top: auto;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 11px 9px 0 9px;
  border-color: #f8f9ff transparent transparent transparent;
}

.ic-mascot__text {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 4px;
  font-family: 'Binggre', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: #1e1b4b;
  word-break: keep-all;
}

.ic-mascot__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 10px 22px rgba(50, 71, 250, 0.2));
  user-select: none;
  -webkit-user-drag: none;
  transition: none;
}

.ic-mascot__img.is-active {
  opacity: 1;
  visibility: visible;
  animation: ic-mascot-float 3.2s ease-in-out infinite;
}

@keyframes ic-mascot-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.ic-game__actions { text-align: center; margin-top: 32px; }

/* =========================================================
 * STEP 3 — FINAL (3인) 레이아웃
 * ========================================================= */
.ic-final {
  padding: 16px 0 48px;
}

.ic-final__head {
  text-align: center;
  margin-bottom: 36px;
}

.ic-final__round {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  background: linear-gradient(135deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(50, 71, 250, 0.3);
}

.ic-final__title {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 10px;
  color: #1e1b4b;
}

.ic-final__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ic-final__sub {
  font-size: 15px;
  color: var(--ic-ink-sub);
  margin: 0;
  font-weight: 600;
}

/* 3장 가로 배치 */
.ic-final__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 24px);
  align-items: stretch;
}

.ic-final__grid .ic-final-card {
  max-width: none;
  width: 100%;
  margin: 0;
  animation: ic-card-enter-pop 0.45s ease both;
}

.ic-final__grid .ic-final-card:nth-child(1) { animation-delay: 0.05s; }
.ic-final__grid .ic-final-card:nth-child(2) { animation-delay: 0.15s; }
.ic-final__grid .ic-final-card:nth-child(3) { animation-delay: 0.25s; }

/* 3번째 카드 — 보라 톤 */
.ic-final-card:nth-child(3) {
  --tc-accent: var(--ic-violet);
  --tc-accent-deep: #5b21b6;
  --tc-accent-soft: #ede9fe;
}

.ic-final-card:nth-child(3) .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.18),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.28),
    0 20px 48px rgba(107, 33, 168, 0.4);
}

.ic-final-card.is-flipped:hover .ic-final-card__face--front {
  transform: scale(1) translateY(-6px);
}

.ic-final-card:nth-child(1).is-flipped:hover .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.22),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.3),
    0 26px 56px rgba(50, 71, 250, 0.5);
}

.ic-final-card:nth-child(2).is-flipped:hover .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.22),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.3),
    0 26px 56px rgba(255, 61, 138, 0.48);
}

.ic-final-card:nth-child(3).is-flipped:hover .ic-final-card__face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 16px 28px -10px rgba(255, 255, 255, 0.22),
    inset 0 -22px 34px -14px rgba(0, 0, 0, 0.3),
    0 26px 56px rgba(107, 33, 168, 0.48);
}

/* FINAL 카드 — 그리드 안에서만 크기·여백 조정 */
.ic-final__grid .ic-final-card__head {
  padding: 14px 12px 10px;
  gap: 6px;
}

.ic-final__grid .ic-final-card__rank {
  align-self: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.ic-final__grid .ic-final-card__label {
  font-size: clamp(10px, 1vw, 12px);
  padding: 3px 10px;
}

.ic-final__grid .ic-final-card__title {
  font-size: clamp(13px, 1.35vw, 22px);
  padding: 0 clamp(14px, 1.5vw, 20px);
  line-height: 1.3;
}

.ic-final__grid .ic-final-card__title::before,
.ic-final__grid .ic-final-card__title::after {
  font-size: clamp(9px, 0.9vw, 11px);
}

.ic-final__grid .ic-final-card__photo {
  width: calc(100% - 24px);
  border-radius: 12px;
}

.ic-final__grid .ic-final-card__foot {
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: center;
  padding: 12px 10px 16px;
  min-height: 0;
}

.ic-final__grid .ic-final-card__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  width: calc(100% - 16px);
  min-height: 5.2em;
  padding: 14px 26px;
  font-size: clamp(11px, 1.08vw, 13px);
  line-height: 1.6;
  -webkit-line-clamp: 4;
  box-sizing: border-box;
  align-self: center;
}

.ic-final-card__desc:empty {
  display: none;
}

.ic-final__actions {
  text-align: center;
  margin-top: 36px;
}

/* =========================================================
 * STEP 4 — 결과 (시안 레이아웃)
 * ========================================================= */
.ic-result {
  padding: 12px 0 48px;
}

.ic-result__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 8px;
}

.ic-result__lead {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ic-ink-sub);
  letter-spacing: -0.02em;
}

.ic-result__lead em {
  font-style: normal;
  color: var(--ic-violet);
  font-weight: 800;
}

.ic-result__headline {
  position: relative;
  margin: 0 0 28px;
  padding: 0 28px;
  font-family: 'Binggre', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-size: clamp(22px, 4.2vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #5b21b6;
  word-break: keep-all;
}

.ic-result__headline::before,
.ic-result__headline::after {
  position: absolute;
  top: 0.15em;
  font-size: 0.55em;
  font-weight: 900;
  color: var(--ic-pink);
  line-height: 1;
}

.ic-result__headline::before {
  content: "\2726";
  left: 0;
}

.ic-result__headline::after {
  content: "\2726";
  right: 0;
}

.ic-result__export {
  margin: 0 auto;
  max-width: 720px;
  padding: 20px 10px;
}

/* 결과 이미지 저장 — 캡처 중 애니메이션 정지 · 사진 레이어 고정 */
.ic-result__export.is-capturing .ic-result__card {
  animation: none;
}

.ic-result__export.is-capturing .ic-result__photo img {
  opacity: 1 !important;
  visibility: visible !important;
  object-fit: cover !important;
}

.ic-result__export-foot {
  margin: 14px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(91, 33, 168, 0.55);
}

.ic-result__card {
  overflow: hidden;
  text-align: left;
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(50, 71, 250, 0.08),
    0 20px 50px rgba(76, 29, 149, 0.14);
  animation: ic-card-enter-pop 0.6s ease both;
}

.ic-result__top {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.92fr);
  gap: 22px;
  align-items: stretch;
  padding: 24px 24px 20px;
}

.ic-result__photo {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #eef0ff;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.1),
    0 10px 28px rgba(50, 71, 250, 0.12);
}

.ic-result__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 2;
}

.ic-result__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  object-fit: cover;
  object-position: center center;
  transform: none;
  display: block;
  z-index: 1;
}

.ic-result__photo img.is-img-error {
  object-fit: contain;
  min-width: 0;
  min-height: 0;
  background: #fde2e7;
}

.ic-result__points {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 0;
  box-sizing: border-box;
}

.ic-result__points li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ic-result__point-check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #6d7cff 0%, var(--ic-brand) 45%, #4f5fd4 100%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 3px 10px rgba(50, 71, 250, 0.32);
  position: relative;
}

.ic-result__point-check::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, transparent 55%);
  pointer-events: none;
}

.ic-result__point-check::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 0 rgba(50, 71, 250, 0.2));
}

.ic-result__point-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ic-ink);
  word-break: keep-all;
}

.ic-result__summary {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 0;
  padding: 18px 22px 0;
  background: linear-gradient(90deg, #e8ecff 0%, #f3e8ff 42%, #ffe8f2 100%);
  text-align: left;
}

.ic-result__mascot-wrap {
  flex: 0 0 auto;
  align-self: flex-end;
  width: clamp(88px, 14vw, 120px);
  margin: 0;
  padding: 0;
  line-height: 0;
}

.ic-result__mascot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  vertical-align: bottom;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 20px rgba(50, 71, 250, 0.18));
}

.ic-result__summary-copy {
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  padding: 0 0 18px;
  text-align: center;
}

.ic-result__summary-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ic-brand);
}

.ic-result__summary-text {
  margin: 0;
  font-family: 'Binggre', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: #1e1b4b;
  word-break: keep-all;
}

.ic-result__share {
  margin-top: 32px;
}

.ic-result__share-label {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ic-violet);
}

.ic-result__share-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ic-share {
  appearance: none;
  border: 1px solid rgba(50, 71, 250, 0.14);
  background: #fff;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ic-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ic-share:hover {
  background: var(--ic-brand);
  border-color: var(--ic-brand);
  color: #fff;
  transform: translateY(-2px);
}

.ic-share--kakao:hover {
  background: #fee500;
  border-color: #fee500;
  color: #111;
}

.ic-share--research {
  border-color: rgba(91, 33, 168, 0.22);
  color: var(--ic-violet);
  background: linear-gradient(180deg, #fff 0%, #f5f0ff 100%);
}

.ic-share--research:hover {
  background: var(--ic-violet);
  border-color: var(--ic-violet);
  color: #fff;
}

.ic-share--save {
  border-color: rgba(50, 71, 250, 0.22);
  color: var(--ic-brand-deep);
  background: linear-gradient(180deg, #fff 0%, var(--ic-brand-soft) 100%);
}

.ic-share--save:hover {
  background: var(--ic-brand);
  border-color: var(--ic-brand);
  color: #fff;
}

.ic-share--save.is-busy {
  opacity: 0.65;
  pointer-events: none;
  cursor: wait;
}

.ic-share__ico {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.ic-share__ico--download svg,
.ic-share__ico--busy svg {
  display: block;
  width: 18px;
  height: 18px;
}

.ic-share__spinner {
  animation: ic-share-spin 0.85s linear infinite;
}

@keyframes ic-share-spin {
  to { transform: rotate(360deg); }
}

.ic-result__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.ic-result__actions .ic-btn--primary,
.ic-result__actions .ic-result__events {
  box-sizing: border-box;
  min-width: min(100%, 240px);
  min-height: 56px;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.ic-result__actions .ic-btn--primary {
  /* border: 2px solid transparent; */
}

.ic-result__events {
  border: 2px solid var(--ic-brand);
  color: var(--ic-brand);
  background: #fff;
  box-shadow: 0 4px 14px rgba(50, 71, 250, 0.1);
}

.ic-result__events:hover {
  background: var(--ic-brand-soft);
  color: var(--ic-brand-deep);
}

/* 결과 — 리서치 안내 모달 (5초 대기) */
body.ic-modal-open {
  overflow: hidden;
}

.ic-result-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  box-sizing: border-box;
}

.ic-result-modal[hidden] {
  display: none !important;
}

.ic-result-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.ic-result-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  margin: 0;
  padding: 28px 26px 24px;
  text-align: center;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.99) 0%,
    rgba(233, 236, 255, 0.96) 48%,
    rgba(255, 230, 240, 0.94) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 56px rgba(50, 71, 250, 0.22),
    0 0 0 1px rgba(50, 71, 250, 0.08);
  transform: translateY(18px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.ic-result-modal__panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px dashed rgba(50, 71, 250, 0.14);
  pointer-events: none;
}

.ic-result-modal.is-open .ic-result-modal__backdrop {
  opacity: 1;
}

.ic-result-modal.is-open .ic-result-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ic-result-modal__chip {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: #fff;
  background: linear-gradient(135deg, var(--ic-brand) 0%, var(--ic-pink) 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 14px rgba(50, 71, 250, 0.28);
}

.ic-result-modal__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ic-violet);
}

.ic-result-modal__title {
  margin: 0 0 10px;
  font-family: 'Binggre', var(--second-family, "Pretendard"), "Noto Sans KR", sans-serif;
  font-size: clamp(20px, 4.5vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: #1e1b4b;
  word-break: keep-all;
}

.ic-result-modal__desc {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ic-ink-sub);
  word-break: keep-all;
}

.ic-result-modal__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.ic-result-modal__actions .ic-btn {
  width: 100%;
  min-height: 52px;
}

.ic-result-modal__research {
  box-shadow:
    0 10px 28px rgba(50, 71, 250, 0.35),
    0 0 0 3px rgba(255, 255, 255, 0.5);
}

.ic-result-modal__close {
  font-size: 15px;
  font-weight: 700;
  color: var(--ic-ink-sub);
  background: rgba(255, 255, 255, 0.88);
}

.ic-result-modal__close:hover {
  color: var(--ic-ink);
  background: #fff;
}

/* =========================================================
 * 반응형 — 모바일 (≤767px)
 * ========================================================= */
@media (max-width: 767px) {
  body { min-width: 0 !important; }

  .idealcup { padding: 28px 16px 64px; }
  .idealcup_screen .idealcup { padding-top: 18px; }

  .ic-deco__item { filter: drop-shadow(0 4px 14px rgba(107, 33, 168, 0.16)); }
  .ic-deco__item--a1 { width: 68px; height: 68px; left: 0; top: 12%; }
  .ic-deco__item--a2 { width: 60px; height: 60px; left: 82%; top: 6%; }
  .ic-deco__item--a3 { width: 44px; height: 44px; }
  .ic-deco__item--a4 { width: 64px; height: 64px; left: 0; top: 68%; }
  .ic-deco__item--a5 { width: 56px; height: 56px; left: 78%; top: 76%; }

  /* 인트로 */
  .ic-intro { padding: 20px 0 40px; }
  .ic-intro__title { font-size: 40px; }
  .ic-intro__brand { font-size: 13px; padding: 10px 20px; margin-bottom: 16px; }
  .ic-intro__sub {
    font-size: 15px;
    padding: 16px 22px 16px 26px;
    margin-bottom: 20px;
    border-radius: 14px;
  }
  .ic-intro__sub::before,
  .ic-intro__sub::after { font-size: 32px; }
  .ic-intro__desc { font-size: 14px; margin-bottom: 22px; padding: 12px 14px; }
  .ic-intro__meta { gap: 8px; margin-bottom: 22px; }
  .ic-intro__meta .ic-pill { font-size: 12px; padding: 8px 14px; }
  .ic-intro__start { min-width: 100%; }
  .ic-deco-bubble { font-size: 11px; padding: 8px 12px; }
  .ic-deco-bubble:nth-child(1) { top: 0; left: 0; }
  .ic-deco-bubble:nth-child(2) { top: 50px; right: 0; }
  .ic-deco-bubble:nth-child(3) { bottom: 40px; left: 0; }

  /* 리빌 — 모바일은 3x4 */
  .ic-reveal__title { font-size: 26px; }
  .ic-reveal__deck {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 100%;
    padding: 0 4px;
  }
  .ic-result__export {
    padding: 5px 0;
  }
  .ic-reveal-card {
    min-height: 140px;
  }
  .ic-reveal-card__caption { font-size: 9px; }
  .ic-reveal-card__badge { top: 6px; left: 6px; font-size: 11px; }
  .ic-reveal__actions { max-width: 100%; }

  /* 게임 — 모바일 */
  .ic-game { padding-top: 8px; }
  .ic-game__head { margin-bottom: 18px; }
  .ic-game__progress { margin-bottom: 10px; }
  .ic-game__round { font-size: 12px; padding: 5px 14px; }
  .ic-game__match { font-size: 12px; }
  .ic-game__progressbar {
    width: min(100%, 320px);
    height: 5px;
    margin-bottom: 14px;
  }
  .ic-game__caption {
    font-size: 15px;
    line-height: 1.45;
    padding: 0 8px;
  }

  .ic-game,
  .ic-game__arena,
  .ic-vs-wrap,
  .ic-vs {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ic-game__arena {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
  }

  .ic-vs-wrap {
    padding: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  /* 본게임: 위 카드 → VS → 아래 카드 (수직) */
  .ic-vs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-items: unset;
    gap: 14px;
    margin-bottom: 12px;
  }

  /* 본게임 카드 — 가로 100% (button 기본 shrink 방지) */
  .ic-vs > .ic-card {
    display: block;
    width: 100%;
    max-width: none;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
    aspect-ratio: unset;
    min-height: 280px;
    max-height: none;
  }

  .ic-vs > .ic-card .ic-card__inner,
  .ic-vs > .ic-card .ic-card__face {
    width: 100%;
    left: 0;
    right: 0;
  }

  .ic-card[data-side="left"] { order: 1; }
  .ic-vs__center { order: 2; }
  .ic-card[data-side="right"] { order: 3; }

  .ic-vs__center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 6px 12px 4px;
    margin: 0 auto;
    gap: 0;
  }

  .ic-game__mascot {
    position: static;
    transform: none;
    max-width: 100%;
    margin: 8px auto 4px;
    padding: 0 8px;
    order: 0;
  }

  .ic-game__mascot .ic-mascot {
    max-width: min(300px, 94vw);
  }

  .ic-vs__divider {
    width: 100%;
    padding: 4px 0 2px;
  }

  .ic-vs__img {
    width: clamp(80px, 22vw, 112px);
    margin: 0 auto;
  }

  .ic-mascot__bubble {
    width: 100%;
    min-width: 0;
    max-width: min(300px, 94vw);
    margin: 0 auto 10px;
    padding: 12px 16px 13px;
    border-radius: 20px;
    transform: none;
  }

  .ic-mascot__bubble::before {
    bottom: -12px;
    left: 50%;
    border-width: 11px 9px 0 9px;
  }

  .ic-mascot__bubble::after {
    bottom: -8px;
    left: 50%;
    border-width: 9px 7px 0 7px;
  }

  .ic-mascot__text { font-size: 13px; }

  .ic-mascot__figure {
    width: clamp(96px, 52vw, 200px);
    height: clamp(96px, 52vw, 200px);
    margin: 0 auto;
  }

  .ic-vs > .ic-card .ic-card__face--front {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ic-vs > .ic-card .ic-card__head {
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 14px 8px;
    gap: 6px;
  }

  .ic-vs > .ic-card .ic-card__label {
    font-size: 12px;
    padding: 5px 12px;
    letter-spacing: 0.06em;
    align-self: center;
  }

  .ic-vs > .ic-card .ic-card__photo {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: calc(100% - 16px);
    height: auto;
    margin: 0 auto 6px;
    aspect-ratio: 16 / 9;
    max-height: none;
    border-radius: 12px;
  }

  .ic-vs > .ic-card .ic-card__title {
    font-size: clamp(20px, 5.6vw, 26px);
    min-height: 0;
    width: 100%;
    padding: 0 16px;
    line-height: 1.32;
    text-align: center;
    overflow: visible;
  }

  .ic-vs > .ic-card .ic-card__title::before,
  .ic-vs > .ic-card .ic-card__title::after {
    display: block;
    font-size: 11px;
    top: 0.28em;
  }

  .ic-vs > .ic-card .ic-card__foot {
    flex: 0 0 auto;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 6px 12px 14px;
  }

  .ic-vs > .ic-card .ic-card__desc {
    display: block;
    width: calc(100% - 12px);
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 18px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    border-radius: 10px;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
    white-space: pre-wrap;
    word-break: keep-all;
  }

  /* desc 장식 ✦ — 모바일에서 숨김 */
  .ic-vs > .ic-card .ic-card__desc::before,
  .ic-vs > .ic-card .ic-card__desc::after,
  .ic-final__grid .ic-final-card__desc::before,
  .ic-final__grid .ic-final-card__desc::after {
    display: none;
    content: none;
  }

  .ic-vs > .ic-card .ic-card__desc,
  .ic-final__grid .ic-final-card__desc {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* 높이 측정용 (화면 밖) */
  .ic-card-measure-holder.ic-vs .ic-card,
  .ic-card-measure-holder.ic-final__grid .ic-final-card {
    aspect-ratio: unset;
    height: auto;
    min-height: 0;
  }
  .ic-card-measure-holder .ic-card__inner,
  .ic-card-measure-holder .ic-final-card__inner {
    position: relative;
    inset: auto;
    height: auto;
  }
  .ic-card-measure-holder .ic-card__face--front,
  .ic-card-measure-holder .ic-final-card__face--front {
    position: relative;
    inset: auto;
    height: auto;
    transform: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .ic-game__actions {
    margin-top: 12px;
    padding: 0 8px;
  }

  .ic-game__actions .ic-btn--ghost {
    width: 100%;
    max-width: 320px;
  }

  /* FINAL — 모바일 수직 1열 + 콘텐츠 높이 (JS) */
  .ic-final { padding-bottom: 40px; }
  .ic-final__head { margin-bottom: 24px; }
  .ic-final__title { font-size: 26px; }
  .ic-final__sub { font-size: 14px; padding: 0 12px; }
  .ic-final__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .ic-final__grid .ic-final-card {
    display: block;
    width: 100%;
    max-width: none;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
    aspect-ratio: unset;
    min-height: 260px;
    max-height: none;
  }
  .ic-final__grid .ic-final-card .ic-final-card__inner,
  .ic-final__grid .ic-final-card .ic-final-card__face {
    width: 100%;
    left: 0;
    right: 0;
  }
  .ic-final__grid .ic-final-card .ic-final-card__face--front {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ic-final__grid .ic-final-card__head { padding: 14px 14px 12px; gap: 8px; }
  .ic-final__grid .ic-final-card__photo {
    width: calc(100% - 20px);
    border-radius: 12px;
    aspect-ratio: 3 / 2;
  }
  .ic-final__grid .ic-final-card__foot { padding: 12px 12px 14px; }
  .ic-final__grid .ic-final-card__rank { font-size: 9px; padding: 4px 9px; }
  .ic-final__grid .ic-final-card__label { font-size: 12px; padding: 4px 11px; }
  .ic-final__grid .ic-final-card__title {
    font-size: clamp(22px, 6.2vw, 28px);
    padding: 0 18px;
    line-height: 1.28;
  }
  .ic-final__grid .ic-final-card__title::before,
  .ic-final__grid .ic-final-card__title::after { font-size: 12px; }
  .ic-final__grid .ic-final-card__desc {
    display: block;
    font-size: 14px;
    padding: 10px 12px;
    min-height: 0;
    width: calc(100% - 16px);
    line-height: 1.5;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
    white-space: pre-wrap;
    word-break: keep-all;
  }
  .ic-final__actions { margin-top: 24px; padding: 0 8px; }

  /* 결과 */
  .ic-result__headline { font-size: 24px; padding: 0 22px; margin-bottom: 22px; }
  .ic-result__top {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 18px 16px;
  }
  .ic-result__photo { max-width: 100%; aspect-ratio: 16 / 9; }
  .ic-result__points {
    height: auto;
    min-height: 0;
    justify-content: center;
    gap: 12px;
  }
  .ic-result__point-title { font-size: 14px; }
  .ic-result__summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 18px 0;
    gap: 10px;
  }
  .ic-result__mascot-wrap {
    order: 2;
    width: clamp(96px, 32vw, 120px);
    margin: 0;
    padding: 0;
    align-self: center;
  }
  .ic-result__summary-copy {
    order: 1;
    padding: 0 0 14px;
  }
  .ic-result__summary-text { font-size: 17px; }
  .ic-result__actions { flex-direction: column; width: 100%; }
  .ic-result-modal { padding: 16px; }
  .ic-result-modal__panel {
    padding: 24px 20px 20px;
    border-radius: 20px;
  }
  .ic-result-modal__title { font-size: 19px; }
  .ic-result-modal__desc { font-size: 13px; margin-bottom: 18px; }

  .ic-result__actions .ic-btn--primary,
  .ic-result__actions .ic-result__events {
    width: 100%;
    max-width: 320px;
    min-width: 0;
  }

  /* 결과 이미지 저장 — 화면과 동일 1열 레이아웃 유지 */
  .ic-result__export.is-capturing .ic-result__top {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 18px 16px;
  }

  .ic-result__export.is-capturing .ic-result__summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 18px 0;
    gap: 10px;
  }

  .ic-result__export.is-capturing .ic-result__summary-copy {
    order: 1;
    padding: 0 0 14px;
  }

  .ic-result__export.is-capturing .ic-result__mascot-wrap {
    order: 2;
    align-self: center;
  }

  .ic-result__export.is-capturing .ic-result__points {
    height: auto;
    min-height: 0;
    justify-content: center;
  }

  .ic-result__export.is-capturing .ic-result__lead,
  .ic-result__export.is-capturing .ic-result__headline {
    display: block !important;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

}

/* 더 좁은 모바일 (≤360px) */
@media (max-width: 360px) {
  .ic-vs > .ic-card .ic-card__title {
    font-size: clamp(18px, 5.2vw, 22px);
  }
  .ic-vs > .ic-card .ic-card__desc { font-size: 13px; }
  .ic-final__grid .ic-final-card__title {
    font-size: clamp(18px, 5.2vw, 22px);
  }
}

/* 모션 감소 */
@media (prefers-reduced-motion: reduce) {
  .ic-step,
  .ic-intro__start .ic-btn__ico,
  .ic-deco-bubble,
  .ic-card,
  .ic-final-card,
  .ic-btn,
  .ic-reveal-card,
  .ic-vs__img,
  .ic-mascot__img {
    animation: none !important;
    transition: none !important;
  }
  .ic-reveal-card,
  .ic-reveal-card.is-deck-enter {
    opacity: 1 !important;
    transform: none !important;
  }
  .ic-reveal-card__back, .ic-reveal-card__front,
  .ic-card__face,
  .ic-final-card__face {
    transition: opacity .15s linear, transform .15s linear, visibility .15s linear !important;
  }
}
