/* Keep the landing page out of the language navigation while the game restores. */
#game-resume-status { display: none; }
html[data-resuming-game] #atlas-hero { display: none; }
html[data-resuming-game] body[data-atlas-view='home'] #game-resume-status {
  display: grid;
  min-block-size: 42vh;
  place-items: center;
  margin: 0;
  color: var(--muted);
}

body[data-phase='result'] .round-clue .portrait-frame {
  width: clamp(96px, 27vw, 112px);
  height: auto;
  aspect-ratio: 4 / 5;
}
.profile-trigger {
  position: relative;
  border: 0;
  padding: 0;
  color: var(--ink);
}
.profile-trigger::after {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-end: 5px;
  display: grid;
  place-items: center;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 4px;
  background: var(--paper);
  content: '⤢' / '';
  font: 700 .94rem/1 var(--font);
  pointer-events: none;
}
.profile-trigger:hover::after, .profile-trigger:focus-visible::after {
  background: var(--ink);
  color: var(--paper);
}
:is(#result-profile-open, #hero-portrait-open) {
  position: absolute;
  z-index: 1;
  inset: 0;
  touch-action: manipulation;
  border-radius: inherit;
  background: transparent;
}
:is(#result-profile-open, #hero-portrait-open, #summary-dialog .summary-face):active { transform: none; }
:is(#result-profile-open, #hero-portrait-open):focus-visible { outline-offset: -3px; }
#hero-credit-open, .round-clue #credit-open { z-index: 2; }
#subject-photo[hidden] ~ #result-profile-open[data-portrait-only] { display: none; }
#summary-dialog .summary-face { inline-size: clamp(80px, 23vw, 96px); }
#summary-dialog .summary-profile-name {
  color: var(--blue);
  min-block-size: 44px;
  text-align: start;
  overflow-wrap: anywhere;
}

#result-profile { width: min(690px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); }
#result-profile[data-portrait-only] { width: min(860px, calc(100vw - 30px)); }
#result-profile[data-portrait-only] .profile-overview { display: block; }
#result-profile[data-portrait-only] figure { inline-size: 100%; text-align: center; }
#result-profile[data-portrait-only] img {
  aspect-ratio: auto;
  max-block-size: calc(100dvh - 155px);
}
#result-profile .dialog-top { padding: 16px clamp(17px, 5vw, 28px) 0; }
#result-profile .dialog-content { padding: 14px clamp(17px, 5vw, 28px) 24px; }
.profile-overview { display: grid; align-items: start; gap: 18px 24px; }
.profile-overview:has(figure:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.profile-overview figure { margin: 0; }
.profile-overview img {
  display: block;
  inline-size: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border-radius: 4px;
  background: var(--portrait);
}
.profile-overview .text-button { color: var(--blue); text-align: start; }
.profile-overview .profile-original { margin-block-end: 8px; }
.profile-overview .profile-bio { color: var(--ink); }
.profile-sources { display: flex; flex-wrap: wrap; gap: 1px 12px; }
.profile-moments { margin-block-start: 18px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.profile-moments :is(h3, h4) { margin: 0; color: var(--ink); }
.profile-moments h3 { font-size: 1.05rem; }
.profile-moments h4 { font-size: .98rem; }
.profile-moments article { margin-block-start: 12px; }
.profile-moments time { font-size: .78rem; font-variant-numeric: tabular-nums; }
.profile-moments article p:last-child { margin-block-end: 0; }
@media (max-width: 480px) {
  .profile-overview:has(figure:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .profile-overview figure { inline-size: min(58%, 190px); }
}
