/* Profiles: contestant-first overview and readable judge interviews. */
.profiles-page {
  --judge-ink: #332e36;
  --judge-muted: #665e6c;
  --judge-line: #d8d0dc;
  --judge-paper: #fffcf9;
  --judge-lilac: #ede8f0;
  --judge-accent: #66516f;
}

.profiles-page:not(.judge-detail-page) .profiles-hero {
  background: #eee7ed;
}

.profiles-page:not(.judge-detail-page) .profiles-hero-layout {
  display: block;
  padding-block: clamp(42px, 6vw, 70px);
}

.profiles-intro-inner {
  max-width: 760px;
}

.profiles-page:not(.judge-detail-page) .profiles-hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  line-height: 1.2;
  letter-spacing: .015em;
}

.profiles-page:not(.judge-detail-page) .profiles-lead {
  max-width: 42em;
  margin-top: 20px;
  color: var(--judge-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.95;
}

.profiles-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.profiles-jump-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #c5b5c9;
  border-radius: 7px;
  color: #5f4869;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
}

.profiles-jump-links a:first-child {
  border-color: #7b2c4b;
  background: #7b2c4b;
  color: #fff;
}

.profiles-page:not(.judge-detail-page) #contestants {
  padding-block: clamp(36px, 5vw, 58px) 0;
}

.profiles-page:not(.judge-detail-page) #contestants .section-heading {
  margin-bottom: 24px;
}

.profiles-page:not(.judge-detail-page) #contestants .section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  line-height: 1.4;
}

.contestants-pending {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid #d8c7d2;
  border-left: 3px solid #98708a;
  border-radius: 12px;
  background: var(--judge-paper);
}

.contestants-pending .mini-label {
  margin: 0 0 10px;
  color: #796173;
  font-size: .75rem;
  letter-spacing: .12em;
}

.contestants-pending h3 {
  margin: 0;
  color: var(--judge-ink);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.contestants-pending > p:not(.mini-label) {
  max-width: 48em;
  margin: 12px 0 0;
  color: var(--judge-muted);
  font-size: 1rem;
  line-height: 1.85;
}

.profiles-page .profile-section-judges {
  margin-top: clamp(32px, 5vw, 52px);
  padding-block: clamp(28px, 4vw, 40px) clamp(48px, 6vw, 76px);
  border-top: 1px solid var(--judge-line);
}

.profiles-page .profile-section-judges .section-heading {
  gap: 8px;
  margin-bottom: 24px;
}

.profiles-page .profile-section-judges .section-heading h2 {
  color: #554b59;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  line-height: 1.5;
}

.profiles-page .profile-section-judges .section-heading > p:not(.section-label) {
  max-width: 46em;
  color: var(--judge-muted);
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.85;
}

.profiles-page .profile-grid-judges {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.profiles-page .profile-card-judge {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border: 1px solid var(--judge-line);
  border-radius: 12px;
  background: var(--judge-paper);
  box-shadow: none;
}

.profile-card-judge .profile-photo {
  display: grid;
  height: 240px;
  min-height: 0;
  flex: 0 0 auto;
  place-items: center;
  padding: 16px 22px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--judge-line);
  background: var(--judge-lilac);
}

.profile-card-judge .profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 223px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center bottom;
}

.profile-card-judge .profile-photo[data-photo-kind="icon"] {
  padding: 24px;
}

.profile-card-judge .profile-photo[data-photo-kind="icon"] img {
  width: 184px;
  height: 184px;
  max-width: 100%;
  border-radius: 18px;
  object-position: center;
}

.profile-card-judge .profile-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 24px;
}

.profile-card-judge .profile-number {
  margin: 0 0 2px;
  color: var(--judge-muted);
  font-family: "Noto Sans JP", sans-serif;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .12em;
}

.profile-card-judge .profile-body h3 {
  margin: 0;
  color: var(--judge-ink);
  font-size: clamp(1.375rem, 2.1vw, 1.625rem);
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-card-judge .profile-reading,
.judge-intro .profile-reading {
  margin: -2px 0 2px;
  color: var(--judge-muted);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .07em;
  line-height: 1.6;
}

.profile-card-judge .profile-title,
.judge-intro .profile-title {
  margin: 0;
  color: var(--judge-accent);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.75;
}

.profile-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.profile-mbti {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgba(111, 82, 119, .22);
  border-radius: 999px;
  background: rgba(246, 239, 248, .82);
  color: var(--judge-ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: .75rem;
  line-height: 1;
  white-space: nowrap;
}

.profile-mbti dt {
  color: var(--judge-muted);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.profile-mbti dd {
  margin: 0;
  font-weight: 700;
  letter-spacing: .06em;
}

.profile-card-judge .profile-text {
  margin: 2px 0 4px;
  color: #504752;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.profile-card-judge .profile-detail {
  width: 100%;
  margin: 2px 0;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--judge-line);
  border-radius: 0;
  background: transparent;
}

.profile-card-judge .profile-detail dd {
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.8;
}

.profile-card-judge .profile-links,
.judge-intro .profile-links {
  gap: 8px;
  margin-block: 2px 4px;
}

.profile-card-judge .profile-links a,
.judge-intro .profile-links a {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid #c9becf;
  border-radius: 7px;
  background: transparent;
  color: #5f4869;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transform: none;
  box-shadow: none;
}

.profile-full-link {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px 14px;
  border: 1px solid #c5b9cb;
  border-radius: 7px;
  background: #eee8f2;
  color: #554060;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}

/* Individual profiles put the portrait and person before the interview. */
.judge-detail-page .judge-breadcrumb {
  margin: 0 auto;
  padding-block: 24px 0;
  color: var(--judge-muted);
  font-size: .8125rem;
  line-height: 1.8;
}

.judge-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.judge-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.judge-breadcrumb li > a,
.judge-breadcrumb li > span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  line-height: 1.8;
}

.judge-breadcrumb a,
.judge-breadcrumb [aria-current] {
  white-space: nowrap;
}

.judge-breadcrumb a {
  color: #625268;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.judge-detail-page .judge-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(36px, 6vw, 76px);
  padding-block: 24px 64px;
}

.judge-portrait {
  display: grid;
  height: 540px;
  min-width: 0;
  margin: 0;
  padding: 26px 26px 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--judge-line);
  border-radius: 16px;
  background: var(--judge-lilac);
}

.judge-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 512px;
  object-fit: contain;
  object-position: center bottom;
}

.judge-portrait[data-photo-kind="icon"] {
  padding: 32px;
}

.judge-portrait[data-photo-kind="icon"] img {
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 24px;
  object-position: center;
}

.judge-intro {
  min-width: 0;
}

.judge-intro > .section-label {
  margin: 0 0 16px;
  color: #74627c;
  font-size: .75rem;
  letter-spacing: .16em;
}

.judge-intro h1 {
  margin: 0 0 10px;
  color: var(--judge-ink);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.judge-intro .profile-reading {
  margin: 0 0 18px;
  font-size: .875rem;
}

.judge-intro .profile-title {
  font-size: 1rem;
}

.judge-intro .profile-facts {
  margin-bottom: 14px;
}

.judge-intro .profile-mbti {
  padding: 6px 10px;
  font-size: .8125rem;
}

.judge-intro .profile-text {
  margin: 0 0 22px;
  color: #514955;
  font-size: 1rem;
  font-weight: 400;
  line-height: 2;
  overflow-wrap: anywhere;
}

.judge-intro .profile-links {
  margin: 0;
}

.judge-quote {
  margin: 28px 0 0;
  padding: 0 0 0 20px;
  border-left: 3px solid #b29ac0;
  color: #58475f;
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 500;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.judge-quote p {
  margin: 0;
}

.judge-intro .quote-label,
.judge-intro .judge-quote-label {
  margin: 12px 0 0;
  color: var(--judge-muted);
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.7;
}

.judge-detail-page .judge-reading-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 80px);
  padding-block: 40px 64px;
  border-top: 1px solid var(--judge-line);
}

.judge-toc {
  position: sticky;
  top: 104px;
  max-height: calc(100svh - 128px);
  padding: 0 0 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.judge-toc h2 {
  margin: 0 0 18px;
  color: #726179;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.7;
}

.judge-toc ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.judge-toc a {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  border-left: 2px solid #d9cedf;
  color: #625569;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.8;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.judge-interview {
  min-width: 0;
  max-width: 760px;
}

.judge-interview > h2 {
  margin: 0 0 14px;
  color: var(--judge-ink);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
}

.judge-answer {
  padding-block: 32px 38px;
  border-bottom: 1px solid var(--judge-line);
  scroll-margin-top: 112px;
}

.judge-answer:last-child {
  border-bottom: 0;
}

.judge-question-number {
  margin: 0 0 10px;
  color: #7c6985;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.6;
}

.judge-answer h3 {
  margin: 0 0 20px;
  color: #3d3443;
  font-size: clamp(1.1875rem, 2.1vw, 1.4375rem);
  font-weight: 700;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.judge-answer-copy {
  max-width: 43em;
  color: #49424d;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 2;
  overflow-wrap: anywhere;
}

.judge-answer-copy p {
  margin: 0 0 1.25em;
}

.judge-answer-copy p:last-child {
  margin-bottom: 0;
}

.judge-detail-page .judge-reading-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  padding-block: 28px 48px;
  border-top: 1px solid var(--judge-line);
}

.judge-back-link,
.judge-other-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 0;
  color: #624d6d;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.75;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #baaac4;
}

.judge-other-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.profiles-jump-links a:focus-visible,
.profile-full-link:focus-visible,
.profile-card-judge a:focus-visible,
.judge-detail-page main a:focus-visible {
  outline: 3px solid #8b619e;
  outline-offset: 4px;
}

@media (hover: hover) {
  .profiles-jump-links a:hover {
    border-color: #987d9f;
    background: #e7ddea;
  }

  .profiles-jump-links a:first-child:hover {
    border-color: #63213b;
    background: #63213b;
  }

  .profile-full-link:hover {
    border-color: #ac97b7;
    background: #e5dcec;
    color: #493453;
  }

  .profile-card-judge .profile-links a:hover,
  .judge-intro .profile-links a:hover {
    border-color: #aa95b4;
    background: #f0eaf4;
    color: #493453;
    transform: none;
    box-shadow: none;
  }

  .judge-toc a:hover {
    border-left-color: #947aa1;
    background: #eae3ef;
    color: #493453;
  }

  .judge-breadcrumb a:hover,
  .judge-back-link:hover,
  .judge-other-links a:hover {
    color: #422e4f;
    text-decoration-color: currentColor;
  }
}

@media (max-width: 899px) {
  .profiles-page .profile-grid-judges {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .profiles-page .profile-card-judge {
    display: grid;
    grid-template-columns: minmax(168px, .42fr) minmax(0, 1fr);
  }

  .profile-card-judge .profile-photo {
    height: 100%;
    min-height: 240px;
    padding: 16px;
    border-right: 1px solid var(--judge-line);
    border-bottom: 0;
  }

  .profile-card-judge .profile-photo img {
    height: 210px;
    max-height: 210px;
    object-position: center;
  }

  .profile-card-judge .profile-photo[data-photo-kind="icon"] {
    padding: 20px;
  }

  .profile-card-judge .profile-photo[data-photo-kind="icon"] img {
    width: 156px;
    height: auto;
    max-height: 156px;
    aspect-ratio: 1;
  }

  .profile-card-judge .profile-body {
    padding: 24px;
  }

  .profile-card-judge .profile-body h3 {
    font-size: 1.5rem;
  }

  .profile-full-link {
    margin-top: 8px;
  }

  .judge-detail-page .judge-detail-hero {
    grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
    gap: 28px;
    padding-bottom: 44px;
  }

  .judge-portrait {
    height: 410px;
    padding: 20px 16px 0;
  }

  .judge-portrait img {
    max-height: 388px;
  }

  .judge-portrait[data-photo-kind="icon"] {
    padding: 22px;
  }

  .judge-intro h1 {
    font-size: 2rem;
  }

  .judge-detail-page .judge-reading-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-block: 28px 48px;
  }

  .judge-toc {
    position: static;
    max-height: none;
    padding: 0 0 28px;
    border-bottom: 1px solid var(--judge-line);
    overflow: visible;
  }

  .judge-toc h2 {
    margin-bottom: 12px;
  }

  .judge-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
  }

  .judge-toc a {
    height: 100%;
  }

  .judge-interview {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .profiles-page .profile-card-judge {
    display: grid;
    grid-template-columns: clamp(92px, 28vw, 112px) minmax(0, 1fr);
    gap: 6px 16px;
    padding: 16px;
  }

  .profile-card-judge .profile-photo {
    grid-column: 1;
    grid-row: 1 / 5;
    height: 120px;
    min-height: 0;
    align-self: center;
    padding: 4px 6px 0;
    border: 0;
    border-radius: 8px;
  }

  .profile-card-judge .profile-photo img {
    height: 100%;
    max-height: 116px;
    object-position: center bottom;
  }

  .profile-card-judge .profile-photo[data-photo-kind="icon"] {
    padding: 8px;
  }

  .profile-card-judge .profile-photo[data-photo-kind="icon"] img {
    width: 100%;
    height: auto;
    max-height: 96px;
    border-radius: 6px;
    object-position: center;
  }

  .profile-card-judge .profile-body {
    display: contents;
  }

  .profile-card-judge .profile-body > * {
    grid-column: 1 / -1;
    margin: 0;
  }

  .profile-card-judge .profile-number {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    padding-top: 2px;
  }

  .profile-card-judge .profile-body h3 {
    grid-column: 2;
    grid-row: 2;
    font-size: 1.375rem;
    letter-spacing: 0;
    line-height: 1.4;
  }

  .profile-card-judge .profile-reading {
    grid-column: 2;
    grid-row: 3;
    font-size: .75rem;
  }

  .profile-card-judge .profile-facts {
    grid-column: 2;
    grid-row: 4;
    align-self: start;
    padding-bottom: 2px;
    gap: 6px 8px;
  }

  .profile-card-judge .profile-title {
    font-size: .8125rem;
    line-height: 1.6;
  }

  .profile-card-judge .profile-mbti {
    padding: 4px 7px;
    font-size: .6875rem;
  }

  .profile-card-judge .profile-mbti dt {
    font-size: .5625rem;
  }

  .profile-card-judge .profile-text {
    padding-top: 12px;
    font-size: .9375rem;
    line-height: 1.85;
  }

  .profile-card-judge .profile-full-link {
    margin-top: 10px;
  }

  .profile-card-judge .profile-links {
    margin-top: 4px;
  }

  .profile-card-judge .profile-links a {
    min-height: 44px;
    padding-inline: 16px;
  }
}

@media (max-width: 559px) {
  .profiles-page:not(.judge-detail-page) .profiles-hero-layout {
    padding-block: 34px 38px;
  }

  .profiles-page:not(.judge-detail-page) .profiles-hero h1 {
    font-size: clamp(2.1rem, 9.2vw, 2.85rem);
  }

  .profiles-page:not(.judge-detail-page) .profiles-lead {
    margin-top: 16px;
    font-size: .9375rem;
  }

  .contestants-pending {
    padding: 20px;
  }

  .contestants-pending > p:not(.mini-label) {
    font-size: .9375rem;
  }

  .profiles-jump-links {
    gap: 8px;
    margin-top: 20px;
  }

  .profiles-jump-links a {
    flex: 1 1 120px;
    padding-inline: 12px;
    font-size: .875rem;
  }

  .judge-detail-page .judge-breadcrumb {
    padding-top: 12px;
  }

  .judge-detail-page .judge-detail-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 16px;
  }

  .judge-portrait {
    height: 360px;
    padding: 18px 22px 0;
    border-radius: 12px;
  }

  .judge-portrait img {
    max-height: 340px;
  }

  .judge-portrait[data-photo-kind="icon"] {
    height: 300px;
    padding: 30px;
  }

  .judge-portrait[data-photo-kind="icon"] img {
    max-width: 230px;
    max-height: 230px;
    border-radius: 18px;
  }

  .judge-intro > .section-label {
    margin-bottom: 12px;
  }

  .judge-intro h1 {
    font-size: clamp(1.875rem, 8vw, 2.375rem);
  }

  .judge-quote {
    margin-top: 24px;
    padding-left: 16px;
  }

  .judge-toc ol {
    gap: 6px 12px;
  }

  .judge-toc a {
    padding: 9px 10px;
    font-size: .8125rem;
  }

  .judge-answer {
    padding-block: 26px 30px;
    scroll-margin-top: 96px;
  }

  .judge-answer h3 {
    margin-bottom: 16px;
    font-size: 1.1875rem;
  }

  .judge-answer-copy {
    font-size: 1rem;
  }

  .judge-detail-page .judge-reading-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 22px 36px;
  }

  .judge-other-links {
    gap: 4px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-full-link,
  .profile-card-judge .profile-links a,
  .judge-detail-page main a {
    transition: none;
    animation: none;
  }
}
