:root {
  --stories-green: #3aaa35;
  --stories-green-dark: #247b2c;
  --stories-green-soft: #eff9ef;
  --stories-mint: #80c880;
  --stories-ink: #253028;
  --stories-muted: #5f6d63;
  --stories-line: #cfe8d0;
  --stories-paper: #ffffff;
}

.stories-page {
  background: #f7fbf7;
  color: var(--stories-ink);
}

.stories-page .stories-main,
.stories-page .stories-page__main {
  overflow: hidden;
}

.stories-breadcrumb {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  color: var(--stories-muted);
  font-size: 0.875rem;
}

.stories-breadcrumb a {
  color: var(--stories-green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.stories-breadcrumb span {
  margin: 0 0.55em;
  color: #9aac9d;
}

.stories-hero {
  position: relative;
  width: min(1440px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #ece9dd;
}

.stories-hero .stories-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.stories-hero .stories-hero-logo {
  position: absolute;
  top: 20%;
  left: 5%;
  display: block;
  width: min(24%, 390px);
  height: auto;
}

.stories-intro,
.stories-closing,
.stories-page__container {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}

.stories-student-section {
  padding: clamp(48px, 7vw, 84px) 0 clamp(40px, 6vw, 68px);
}

.stories-student-section__title {
  margin: 0;
  color: var(--stories-green-dark);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-align: center;
}

.stories-intro {
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
}

.stories-kicker {
  margin: 0 0 0.6rem;
  color: var(--stories-green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.stories-title {
  margin: 0;
  color: var(--stories-green-dark);
  font-size: clamp(1.8rem, 4.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
}

.stories-title small {
  display: block;
  margin-top: 0.65rem;
  color: var(--stories-ink);
  font-size: 0.48em;
  font-weight: 700;
}

.stories-lead {
  max-width: 880px;
  margin: clamp(30px, 5vw, 48px) auto 0;
  font-size: clamp(1rem, 1.7vw, 1.08rem);
  line-height: 2.05;
}

.stories-students {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: clamp(28px, 5vw, 46px) 0 0;
  padding: 0;
  list-style: none;
}

.stories-student {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  padding: 26px 22px 24px;
  overflow: hidden;
  background: var(--stories-paper);
  border: 1px solid var(--stories-line);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(53, 104, 59, 0.09);
  text-align: center;
}

.stories-student--nishi {
  --student-color: #00750e;
}

.stories-student--oshima {
  --student-color: #3333ff;
}

.stories-student--yasufuku {
  --student-color: #cc0000;
}

.stories-student::before {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--student-color, var(--stories-green));
  content: "";
}

.stories-student img,
.stories-student__image {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: contain;
}

.stories-student .major,
.stories-student__major {
  min-height: 3.2em;
  margin-top: 18px;
  color: var(--stories-muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.6;
}

.stories-student .name,
.stories-student__name {
  margin-top: 8px;
  color: var(--student-color, var(--stories-green-dark));
  font-size: 1.25rem;
  font-weight: 800;
}

.stories-student .introduce,
.stories-student__introduction {
  margin-top: 9px;
  font-size: 0.9rem;
  line-height: 1.65;
}

.stories-article {
  padding-top: 0;
  padding-bottom: clamp(54px, 8vw, 100px);
}

.stories-article__intro {
  margin: 0 0 clamp(40px, 7vw, 68px);
  padding: clamp(28px, 4vw, 42px);
  color: #344438;
  background: #fff;
  border-left: 7px solid var(--stories-green);
  border-radius: 0 18px 18px 0;
  box-shadow: 0 10px 30px rgba(53, 104, 59, 0.07);
  font-weight: 600;
  line-height: 2.15;
}

.stories-section {
  margin: 0 0 30px;
  overflow: clip;
  background: var(--stories-paper);
  border: 1px solid var(--stories-line);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(53, 104, 59, 0.08);
}

.stories-section > summary,
.stories-section__summary {
  position: relative;
  display: flex;
  min-height: 92px;
  align-items: center;
  padding: 24px 78px 24px 30px;
  color: #fff;
  background: linear-gradient(120deg, var(--stories-green-dark), #2f8437);
  cursor: pointer;
  list-style: none;
}

.stories-section > summary::-webkit-details-marker,
.stories-section__summary::-webkit-details-marker {
  display: none;
}

.stories-section > summary::after,
.stories-section__summary::after {
  position: absolute;
  top: 50%;
  right: 28px;
  width: 18px;
  height: 18px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  content: "";
  transform: translateY(-68%) rotate(45deg);
  transition: transform 0.22s ease;
}

.stories-section[open] > summary::after,
.stories-section[open] > .stories-section__summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.stories-section > summary:hover,
.stories-section__summary:hover {
  filter: brightness(1.05);
}

.stories-section > summary:focus-visible,
.stories-section__summary:focus-visible {
  outline-color: #fff;
  outline-offset: -4px;
}

.stories-section-title,
.stories-section__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.stories-section-body,
.stories-section__content {
  padding: clamp(28px, 5vw, 54px);
}

.stories-section-body > :first-child,
.stories-section__content > :first-child {
  margin-top: 0;
}

.stories-section-body > :last-child,
.stories-section__content > :last-child {
  margin-bottom: 0;
}

.stories-article p {
  margin: 0 0 1.5em;
  font-size: clamp(0.98rem, 1.4vw, 1.06rem);
  line-height: 2;
}

.stories-article .stories-article__intro {
  margin: 0 0 clamp(40px, 7vw, 68px);
  line-height: 2.15;
}

.stories-article h3 {
  position: relative;
  margin: clamp(42px, 6vw, 62px) 0 24px;
  padding: 0.82em 1em 0.82em 1.35em;
  color: var(--stories-green-dark);
  background: var(--stories-green-soft);
  border-radius: 10px;
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  font-weight: 800;
  line-height: 1.6;
}

.stories-article h3::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--stories-green);
  border-radius: 10px 0 0 10px;
  content: "";
}

.stories-article a {
  color: #1268a8;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.stories-article sup {
  font-size: 0.72em;
  vertical-align: super;
}

.stories-note {
  display: inline-block;
  margin-top: 0.55em;
  color: var(--stories-muted);
  font-size: 0.86em;
  line-height: 1.75;
}

.stories-speaker {
  font-weight: 800;
}

.stories-speaker--nishi {
  color: #00750e;
}

.stories-speaker--oshima {
  color: #3333ff;
}

.stories-speaker--yasufuku {
  color: #cc0000;
}

.stories-article .flex {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
  gap: clamp(24px, 4vw, 42px);
  align-items: center;
  margin: 34px 0;
}

.stories-article .flex.reverse {
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
}

.stories-article .flex.reverse > :first-child {
  order: 2;
}

.stories-article .flex.reverse > :last-child {
  order: 1;
}

.stories-article .flex p {
  margin-bottom: 0;
}

.stories-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 38%);
  gap: clamp(24px, 4vw, 42px);
  align-items: center;
  margin: 34px 0;
}

.stories-media--portrait {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 30%);
}

.stories-media--reverse {
  grid-template-columns: minmax(240px, 38%) minmax(0, 1fr);
}

.stories-media--reverse .stories-media__figure {
  order: -1;
}

.stories-media__body > :last-child {
  margin-bottom: 0;
}

.stories-media__figure,
.stories-article__figure,
.stories-article__closing-image {
  margin: 0;
}

.stories-article__figure--wide,
.stories-article__closing-image {
  margin: clamp(38px, 6vw, 64px) 0;
}

.stories-article img,
.stories-media__figure img,
.stories-article__figure img,
.stories-article__closing-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 16px;
}

.stories-article .flex img,
.stories-article .img-vertical img {
  width: 100%;
}

.stories-media__figure--portrait img {
  max-height: 600px;
  object-fit: cover;
}

.stories-article__figure--wide img,
.stories-article__closing-image img {
  width: min(100%, 900px);
}

.stories-article .img-vertical img {
  max-height: 560px;
  object-fit: cover;
}

.stories-article > p[style*="text-align"] {
  margin: clamp(44px, 7vw, 76px) 0 0;
}

.stories-closing {
  padding: 0 0 clamp(58px, 8vw, 96px);
  text-align: center;
}

.stories-closing img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 14px 42px rgba(33, 64, 37, 0.13);
}

.stories-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 36px;
  padding: 0.85em 1.7em;
  color: #fff;
  background: var(--stories-green-dark);
  border: 2px solid var(--stories-green-dark);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.stories-back:hover {
  color: var(--stories-green-dark);
  background: #fff;
}

@media (max-width: 767px) {
  .stories-breadcrumb,
  .stories-intro,
  .stories-closing,
  .stories-page__container {
    width: min(100% - 28px, 1040px);
  }

  .stories-breadcrumb {
    padding-block: 14px;
  }

  .stories-hero {
    aspect-ratio: 25 / 19;
  }

  .stories-hero .stories-hero-image {
    object-position: bottom left;
  }

  .stories-hero .stories-hero-logo {
    top: 15px;
    left: 5px;
    width: 42%;
  }

  .stories-students {
    grid-template-columns: 1fr;
  }

  .stories-student {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      "photo major"
      "photo name"
      "photo intro";
    align-items: center;
    column-gap: 18px;
    padding: 22px 18px;
    text-align: left;
  }

  .stories-student img,
  .stories-student__image {
    grid-area: photo;
    width: 104px;
    height: 104px;
  }

  .stories-student .major,
  .stories-student__major {
    grid-area: major;
    min-height: 0;
    margin-top: 0;
    font-size: 0.78rem;
  }

  .stories-student .name,
  .stories-student__name {
    grid-area: name;
    margin-top: 4px;
    font-size: 1.08rem;
  }

  .stories-student .introduce,
  .stories-student__introduction {
    grid-area: intro;
    margin-top: 5px;
    font-size: 0.8rem;
  }

  .stories-section {
    border-radius: 16px;
  }

  .stories-section > summary,
  .stories-section__summary {
    min-height: 78px;
    padding: 20px 58px 20px 20px;
  }

  .stories-section > summary::after,
  .stories-section__summary::after {
    right: 21px;
    width: 15px;
    height: 15px;
  }

  .stories-section-body,
  .stories-section__content {
    padding: 26px 20px 34px;
  }

  .stories-article .flex,
  .stories-article .flex.reverse {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .stories-article .flex.reverse > :first-child,
  .stories-article .flex.reverse > :last-child {
    order: initial;
  }

  .stories-article .flex p {
    margin-bottom: 0;
  }

  .stories-media,
  .stories-media--portrait,
  .stories-media--reverse {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .stories-media--reverse .stories-media__figure {
    order: initial;
  }

  .stories-media__figure,
  .stories-media__figure--portrait {
    width: 100%;
  }

  .stories-article .flex p[style*="text-align"],
  .stories-article .img-vertical {
    width: 100%;
  }

  .stories-closing img {
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  .stories-student {
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 14px;
  }

  .stories-student img,
  .stories-student__image {
    width: 84px;
    height: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stories-section > summary::after {
    transition: none;
  }
}

@media print {
  .stories-page {
    background: #fff;
  }

  body.stories-page > header,
  body.stories-page > footer,
  .stories-breadcrumb,
  .stories-back {
    display: none !important;
  }

  .stories-section {
    break-inside: auto;
    border: 1px solid #bbb;
    box-shadow: none;
  }

  .stories-section > summary {
    color: #111;
    background: #eee;
  }

  .stories-section > summary::after {
    display: none;
  }

  .stories-section:not([open]) > .stories-section-body,
  .stories-section:not([open]) > .stories-section__content {
    display: block;
  }
}
