#result .quiz{background:#f3f1e7;border:1px solid #dcd8c8;padding:clamp(16px,3vw,26px)}
#result .quiz h3{font-size:1.55rem}
#result .quiz ol{padding:0;list-style:none}
#result .quiz li{display:flex;align-items:center;gap:12px;background:#fffdf7;border-radius:14px;padding:10px 14px;margin:10px 0;box-shadow:0 2px 0 #e1dccd}
#result .quiz li b{background:#e6d9a8;border-radius:50%;min-width:2em;line-height:2em;text-align:center}
#result .quiz button,#result .another-clan{background:#fffdf7;border:1px solid #d8c9aa;box-shadow:0 3px 0 #d6cbb3;font-weight:700;min-height:42px}
#result .quiz .correct{background:#345f48;color:white}
#result .quiz [role=status]:empty,#result .reward:empty{display:none}
#result .reward{display:flex;gap:12px;align-items:center;flex-wrap:nowrap;margin-top:16px}
#result .stamp{display:inline-block;padding:6px 12px;border:3px double #899773;border-radius:12px;color:#66774f;transform:rotate(-4deg);animation:classic-stamp .35s ease-out}
#result .stamp.big{font-size:1.18rem}
#result .wrong{animation:classic-shake .3s}
@keyframes classic-shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@keyframes classic-stamp{from{opacity:0;transform:scale(1.45) rotate(-8deg)}}
#result .quiz-links{margin:16px 0 24px}
#result .activity-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
#result .activity-links a{display:grid;gap:8px;padding:18px;border:1px solid #dfcdb5;border-radius:16px;background:#f4ebd7;text-decoration:none}
#result .activity-links a:nth-child(2){background:#e5eef5;border-color:#c4d6e5}
#result .activity-links a:hover strong{text-decoration:underline}
#result .classic-legend{display:inline-block;color:#884135;background:#fcf2df;border-radius:12px;padding:2px 8px}
#result .activity-links a:nth-child(3){background:#e8efdd;border-color:#cad6b9}
@media(max-width:600px){#result .activity-links{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#result .wrong,#result .stamp{animation:none}}

#result .quiz .reward button{flex:0 0 auto}#result .quiz .reward .stamp{white-space:nowrap;font-size:1.05rem;padding:5px 10px}#result .quiz .reward .stamp.big{font-size:1.1rem}
@media(max-width:400px){#result .quiz .reward{gap:10px}#result .quiz .reward .stamp,#result .quiz .reward .stamp.big{font-size:.95rem;padding:5px 8px}}

/* Three portraits share a row; larger groups use the full card width. */
#result .founder:has(.origin-portrait:nth-child(3)) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
#result .origin-portraits:has(> :nth-child(3)) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#result .origin-portraits:has(> :nth-child(3)) img { width: 100%; height: auto; }
#result .founder:has(.origin-portrait:nth-child(4)) { grid-template-columns: minmax(0, 1fr); }
#result .origin-portraits:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) {
  #result .founder:has(.origin-portrait:nth-child(3)) { grid-template-columns: minmax(0, 1fr); }
  #result .origin-portraits:has(> :nth-child(4)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

main nav.people-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  max-width: none;
  margin: 10px 0 24px;
  padding: 0;
  background: transparent;
  border: 0;
}
.people-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #345e49;
  font-size: .92rem;
  text-underline-offset: 3px;
}

.map-return{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:0 0 22px;padding:14px 18px;border:1px solid #c3cfb7;border-radius:16px;background:#edf2e5;font:inherit}
.map-return span{font-size:.95rem;color:#425b48}
.map-return a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 18px;border:1px solid #345e49;border-radius:24px;background:#fffdf7;color:#294f3c;font-weight:700;text-decoration:none;word-break:keep-all;overflow-wrap:anywhere}
.map-activity[hidden]{display:none!important}
@media(max-width:700px){.map-return a{width:100%;text-align:center}}

#result .photo-invite{display:flex;align-items:center;gap:18px;padding:22px 24px;margin:22px 0;border:1px solid #c5d1b7;border-left:5px solid #607f61;border-radius:18px;background:#edf2e7;box-shadow:0 3px 0 #dfe7d5}
#result .photo-invite-symbol{display:grid;place-content:center;width:60px;height:60px;border-radius:50%;background:#fffdf5;border:1px solid #d4ddc7;flex:none;color:#3e654c}
#result .photo-invite svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
#result .photo-invite-symbol svg{width:31px;height:31px}
#result .photo-invite-copy{flex:1;min-width:0}
#result .photo-invite-kicker{display:block;font:700 12px/1.5 "Noto Sans KR",sans-serif;color:#617550;margin-bottom:5px}
#result .photo-invite h2{font-size:1.2rem!important;line-height:1.5;margin:0 0 6px!important}
#result .photo-invite p{font-size:.95rem;line-height:1.65;margin:0;color:#4f6856}
#result .photo-invite a{display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:26px;background:#2f5543;color:#fffdf7;text-decoration:none;font-weight:700;line-height:1.5;gap:8px;min-height:48px;padding:12px 20px;box-shadow:0 3px 0 #203d2d;font-size:.98rem;border:1px solid #2f5543}
#result .photo-invite a svg{width:20px;height:20px}
@media(max-width:700px){#result .photo-invite{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;padding:18px 16px}#result .photo-invite-symbol{width:40px;height:40px;align-self:start;margin-top:4px}#result .photo-invite-symbol svg{width:23px;height:23px}#result .photo-invite h2{font-size:1.1rem!important}#result .photo-invite p{font-size:.9rem}#result .photo-invite a{grid-column:1/-1;width:100%;justify-content:center}#result .photo-invite-kicker{font-size:11px}}

.person-context{font-size:.875rem;color:#435b49;line-height:1.65;padding:8px 10px;background:#eef2e6;border-radius:8px}.grid:has(>article:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:700px){.grid:has(>article:nth-child(2):last-child){grid-template-columns:1fr}}

#result .person-actions{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:9px;clear:both}
#result .person-actions a{display:inline-flex;align-items:center;min-height:34px;border:1px solid #c8d3ba;border-radius:8px;padding:3px 9px;background:#f4f6ed;font-size:.87rem}
#result .timeline .figure-card{display:flow-root}
#result .timeline-portrait{float:inline-start;width:83px;height:83px;object-fit:contain;border-radius:10px;background:#f3ecd9;margin:0 12px 6px 0}
#result .timeline-role{display:block;color:#55704f;font-size:.8rem;font-weight:750}
#result .person-facts{display:flex;flex-wrap:wrap;gap:2px 12px;margin-top:5px;font-size:.9rem}


/* Standalone illustrations share the same square as atlas portraits. */
#result .people-portrait-frame > img {
  width:100%;
  height:100%;
  margin:0;
  float:none;
  object-fit:contain;
  background:transparent;
}

#result .people-portrait-inset > img {
  scale:1.22;
}
