.rmar {
  box-sizing: border-box;
  width: 100%;
  max-width: 960px;
  margin: 32px auto;
  padding: 20px;
  border: 1px solid #d7d2bd;
  background: #fff;
  color: #222;
  font-family: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  line-height: 1.6;
}

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

/* Keep SWELL's global heading decoration out of the self-contained CTA. */
.rmar .rmar__title,
.rmar .rmar__name {
  position: static;
  display: block;
  float: none;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none !important;
  background-image: none !important;
  box-shadow: none;
  color: #222;
  text-align: inherit;
  text-decoration: none;
  text-indent: 0;
  text-shadow: none;
  transform: none;
}

.rmar .rmar__title::before,
.rmar .rmar__title::after,
.rmar .rmar__name::before,
.rmar .rmar__name::after {
  display: none !important;
  content: none !important;
}

.rmar .rmar__header {
  max-width: 680px;
  margin: 0 auto 14px;
  text-align: center;
}

.rmar .rmar__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
}

.rmar .rmar__note {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.rmar .rmar__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.rmar .rmar__card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
}

.rmar .rmar__portrait {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f2f2ef;
}

.rmar .rmar__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center 24%;
}

.rmar .rmar__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 10px 12px 12px;
}

.rmar .rmar__name {
  margin: 0 0 7px;
  border-bottom: 0 !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: normal;
}

.rmar .rmar__supervisor {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-inline-start: 7px;
  padding: 1px 6px;
  border: 1px solid #cbbb6c;
  color: #6f642d;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: 2px;
  white-space: nowrap;
}

.rmar .rmar__areas {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.rmar .rmar__areas li {
  margin: 0;
  padding: 2px 6px;
  border: 1px solid #cbbb6c;
  color: #4a4328;
  font-size: 11px;
  line-height: 1.4;
}

.rmar .rmar__profile {
  margin: 0 0 10px;
  color: #4d4d4d;
  font-size: 13px;
  line-height: 1.6;
}

.rmar .rmar__button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: auto 0 0;
  padding: 6px 9px;
  border: 2px solid #cbbb6c;
  border-radius: 4px;
  background: #e5d480;
  box-shadow: none;
  color: #000 !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none !important;
  text-shadow: none;
  transition: background-color .16s, border-color .16s;
}

.rmar .rmar__button::before,
.rmar .rmar__button::after {
  display: none !important;
  content: none !important;
}

.rmar .rmar__button:hover {
  border-color: #000;
  background: #fdf1b4;
}

.rmar .rmar__button:focus-visible {
  outline: 3px solid rgba(161, 149, 89, .28);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .rmar {
    max-width: 720px;
  }

  .rmar .rmar__grid {
    grid-template-columns: 1fr;
  }

  .rmar .rmar__card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    height: auto;
  }

  .rmar .rmar__portrait {
    height: 100%;
    min-height: 190px;
    aspect-ratio: auto;
  }

  .rmar .rmar__portrait img {
    object-position: center top;
  }
}

@media (max-width: 560px) {
  .rmar {
    margin: 24px auto;
    padding: 16px 12px;
  }

  .rmar .rmar__header {
    margin-bottom: 12px;
  }

  .rmar .rmar__title {
    font-size: 20px;
  }

  .rmar .rmar__note {
    font-size: 13px;
  }

  .rmar .rmar__grid {
    gap: 12px;
  }

  .rmar .rmar__card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .rmar .rmar__portrait {
    min-height: 0;
  }

  .rmar .rmar__body {
    padding: 12px;
  }

  .rmar .rmar__name {
    margin-bottom: 6px;
    font-size: 18px;
  }

  .rmar .rmar__areas {
    margin-bottom: 7px;
  }

  .rmar .rmar__areas li {
    padding: 2px 6px;
    font-size: 10px;
  }

  .rmar .rmar__profile {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.65;
  }

  .rmar .rmar__button {
    min-height: 38px;
    padding: 5px 7px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rmar .rmar__button {
    transition: none;
  }
}
