/* 결과 화면 풀뽑기 검정 카드(v4.3): 원작 검정 카드(흰 5급·은색 2급)처럼 굵은 손그림 테두리 + 안쪽 테두리,
   왼쪽 위 「풀뽑기」 칸, 오른쪽 사진 칸(내 차림), 큰 급수 글자. 카드 색은 cert.js가 data-tier로 정함. index.html 인라인 .cert를 덮어씀 */
.cert {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 10px;
  border: 2.5px solid var(--ink); border-radius: 16px; padding: 12px 12px 10px 16px; background: #fffefb;
  box-shadow: 0 3px 0 rgba(61, 48, 43, .22); text-align: left;
}
.cert::before { content: ""; position: absolute; inset: 5px; border: 1.5px solid var(--ink); border-radius: 11px; opacity: .55; pointer-events: none; }
/* 카드 위 가운데 초록 왕관(원작 카드의 작은 초록 표시) */
.cert::after {
  content: ""; position: absolute; top: -9px; left: 50%; width: 26px; height: 16px; transform: translateX(-50%);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 16'%3E%3Cpath d='M2 14 L3 4 L8.5 9 L13 2 L17.5 9 L23 4 L24 14 Z' fill='%237fbf5f' stroke='%233d302b' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cert-kind {
  grid-column: 1; justify-self: start; font-family: var(--display); font-size: 0.82rem; line-height: 1.3;
  border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 9px; background: #fff;
}
.cert .grade { grid-column: 1; color: var(--ink); font-size: 2.5rem; line-height: 1.05; white-space: nowrap; }
.cert .grade.long { font-size: 1.75rem; }
.cert-photo {
  grid-column: 2; grid-row: 1 / span 2; width: 74px; height: 74px; border: 2px solid var(--ink); border-radius: 10px; background: #f3efe6;
}
.cert .stamp { right: 52px; top: auto; bottom: -10px; width: 52px; height: 52px; font-size: 0.82rem; background: rgba(255, 255, 255, .55); }
.grade-msg { font-size: 0.85rem; text-align: center; }
/* 급수별 카드 색: 5~3급 흰색, 2급 은색(원작 우사기 카드), 1급 금색, 토벌 칭호는 연두 */
.cert[data-tier="silver"] { background: linear-gradient(135deg, #f3f5f7, #d3d9df 55%, #eef1f4); }
.cert[data-tier="gold"] { background: linear-gradient(135deg, #fff6d6, #f0d987 55%, #fff1c2); }
.cert[data-tier="tobatsu"] { background: linear-gradient(135deg, #f2f9ea, #d5ebbd 55%, #eef7e4); }
@media (max-width: 899px) and (orientation: landscape) and (max-height: 500px) {
  .cert { padding: 8px 10px 6px 12px; }
  .cert .grade { font-size: 1.8rem; }
  .cert .grade.long { font-size: 1.35rem; }
  .cert-photo { width: 54px; height: 54px; }
  .cert .stamp { width: 42px; height: 42px; right: 40px; font-size: 0.72rem; }
}
