:root {
  color-scheme: light;
  --navy: #0b1f4e;
  --blue: #3d5a96;
  --ink: #263959;
  --line: #d6dfec;
  --mist: #f2f6fb;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--navy);
  background: #fff;
  font-family: var(--sans);
  line-height: 1.65;
}

h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.container {
  width: min(93%, 75rem);
  margin-inline: auto;
}

.site-header,
.site-footer {
  display: grid;
  justify-items: center;
  background: #fff;
}

.site-header {
  padding: 1.125rem 1rem;
  border-bottom: 1px solid var(--line);
}

.brand { width: clamp(11rem, 17vw, 15.25rem); }

.site-notice {
  padding: .625rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
  color: var(--ink);
  font-size: .875rem;
  text-align: center;
  text-wrap: pretty;
}

.site-notice-policy {
  margin-top: .25rem;
  font-weight: 700;
}

.hero {
  padding: clamp(2.25rem, 5vw, 4.875rem) 0 clamp(1rem, 3vw, 2.75rem);
  background: linear-gradient(170deg, #eef3f9 0%, #f8fafd 52%, #f2f5fa 100%);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0 0 clamp(1.625rem, 3.8vw, 3.25rem);
  text-align: center;
  font: 600 clamp(1.5rem, 3.35vw, 3rem)/1.55 var(--serif);
  letter-spacing: .11em;
}

.hero h1 span { display: inline-block; }

.hero-photo {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
}

.talents {
  padding-block: clamp(3rem, 7vw, 6.25rem);
}

.section-title {
  font: 400 clamp(2.375rem, 5vw, 4.5rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: .025em;
}

.talents .section-title {
  display: flex;
  align-items: center;
  column-gap: clamp(1rem, 3vw, 2.25rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.talents .section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.talent-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(.75rem, 1.6vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.talent-card {
  display: block;
  width: 100%;
  padding: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.talent-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 38%;
  background: var(--mist);
}

.card-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .3rem;
  row-gap: .125rem;
  padding: .75rem 0 .875rem;
}

.card-name {
  grid-column: 1;
  font-size: clamp(.9375rem, 1.5vw, 1.25rem);
  font-weight: 700;
}

.card-romanized {
  grid-column: 1;
  color: var(--blue);
  font: .875rem/1.35 Georgia, "Times New Roman", serif;
  letter-spacing: .015em;
}

.card-open {
  grid-area: 1 / 2 / 3 / 3;
  display: grid;
  place-items: center;
  width: 1.75rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 1.125rem/1 var(--sans);
}

.talent-card:hover .card-open,
.talent-card:focus-visible .card-open {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

#talent-status:empty { display: none; }

.about {
  background: var(--mist);
  border-block: 1px solid var(--line);
}

.about-layout {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 2fr;
  gap: clamp(1.25rem, 5vw, 4.75rem);
  padding-block: clamp(2.75rem, 7vw, 6rem);
}

.about p {
  max-width: 41rem;
  padding-left: clamp(1.25rem, 5vw, 4.75rem);
  border-left: 1px solid #b7c6e6;
  font-size: clamp(1rem, 1.65vw, 1.25rem);
  line-height: 2;
  color: var(--ink);
}

.site-footer {
  gap: 1rem;
  padding: 2.25rem 1rem 1.5rem;
  text-align: center;
}

.site-footer .brand { width: 10.75rem; }
.site-footer small { color: var(--blue); font-size: .8125rem; }

body:has(.profile-dialog[open], .chat-dialog[open]) { overflow: hidden; }

.profile-dialog {
  width: min(58rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  overscroll-behavior: contain;
}

.profile-dialog::backdrop { background: rgb(11 31 78 / 65%); }

.profile-controls {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .625rem .875rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.close-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.close-button:hover { background: var(--mist); }

.profile-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  padding: clamp(1.125rem, 4vw, 2.5rem);
}

.profile-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

.profile-images img {
  width: 100%;
  aspect-ratio: 1 / 2.5;
  object-fit: contain;
  background: #f9fafd;
}

.profile-info h2 {
  font-size: clamp(1.5rem, 4vw, 2.375rem);
  line-height: 1.3;
}

.profile-romanized {
  color: var(--blue);
  font: 1rem/1.5 Georgia, "Times New Roman", serif;
  margin-top: .25rem;
}

.profile-tagline { margin-top: 1.5rem; font-weight: 700; }
.profile-description { margin-top: .625rem; color: var(--ink); }
.profile-info dl { margin: 1.25rem 0 0; }

.profile-info dl div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: .625rem;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
}

.profile-info dt { color: var(--blue); }
.profile-info dd { margin: 0; }

.chat-action {
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border: 1px solid var(--navy);
  border-radius: .25rem;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.chat-action:hover { background: var(--blue); }
.chat-action:disabled { opacity: .62; cursor: wait; }
.profile-chat { margin-top: 1.25rem; }

.chat-dialog {
  width: min(37rem, calc(100% - 2rem));
  height: min(42rem, calc(100dvh - 2rem));
  max-height: calc(100dvh - 2rem);
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
}

.chat-dialog[open] { display: flex; flex-direction: column; }
.chat-dialog::backdrop { background: rgb(11 31 78 / 40%); }

.chat-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.chat-header img { flex: none; width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; }
.chat-header h2 { flex: 1; font-size: clamp(1rem, 4vw, 1.375rem); }

.chat-thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  background: var(--mist);
}

.chat-bubble {
  align-self: flex-start;
  max-width: 88%;
  padding: .625rem .875rem;
  border: 1px solid var(--line);
  border-radius: .625rem;
  background: #fff;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-bubble.user { align-self: flex-end; background: var(--navy); color: #fff; }
.chat-status { padding: .375rem 1rem; color: var(--ink); font-size: .875rem; }
.chat-status:empty { display: none; }
.chat-form { padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); }
.chat-disclosure { margin-bottom: .5rem; color: var(--ink); font-size: .875rem; }
.chat-form label { font-size: .875rem; font-weight: 700; }
.chat-compose { display: flex; gap: .5rem; margin-top: .25rem; }

.chat-compose input {
  flex: 1;
  min-width: 0;
  padding: .5rem .625rem;
  border: 1px solid var(--blue);
  border-radius: .25rem;
  font: inherit;
  color: inherit;
}

@media (max-width: 700px) {
  .container { width: 92%; }
  .hero h1 { font-size: clamp(1.25rem, 5.75vw, 2rem); }
  .talent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
  .about-layout { grid-template-columns: 1fr; }
  .profile-content { grid-template-columns: minmax(0, 1fr); }
  .profile-info { grid-row: 1; }
  .profile-images img { aspect-ratio: 1 / 1.75; }
}
