<p class="no-support-browser">ご利用のブラウザはsubgridに未対応です。<br>Chrome最新版か、Firefox・Safariでご確認ください</p>

<header class="global-header">
  <h1 class="brand-title"><b>CATS</b> MAGAZINE</h1>
</header>
<main class="main">
  <div class="card-container">
    <div class="card">
      <h2 class="card-title">Feeling Good</h2>
      <img class="image" src="https://assets.codepen.io/221808/gallery_1.jpg" width="360" height="240" alt="" />
      <p class="description">I AM A CAT. As yet I have no name.</p>
      <div class="label">
        <span class="material-symbols-outlined">pets</span>Goods
      </div>
    </div>
    <div class="card">
      <h2 class="card-title">What's going on here?</h2>
      <img class="image" src="https://assets.codepen.io/221808/gallery_2.jpg" width="360" height="240" alt="" />
      <p class="description">
        I have no idea where he was born. All I remember is that he used to
        meow and cry in a dim, dank place.
      </p>
      <div class="label">
        <span class="material-symbols-outlined">restaurant</span>Food
      </div>
    </div>
    <div class="card">
      <h2 class="card-title">
        Soon the sun was setting as the wind blew over the pond.
      </h2>
      <img class="image" src="https://assets.codepen.io/221808/gallery_3.jpg" width="360" height="240" alt="" />
      <p class="description">It was here that I first saw a human being</p>
      <div class="label">
        <span class="material-symbols-outlined">tibia</span>Health
      </div>
    </div>
    <div class="card">
      <h2 class="card-title">I was getting very hungry.</h2>
      <img class="image" src="https://assets.codepen.io/221808/gallery_4.jpg" width="360" height="240" alt="" />
      <p class="description">
        I later heard that it was a "shosei," the most ferocious and vicious
        race of human beings.
      </p>
      <div class="label">
        <span class="material-symbols-outlined">restaurant</span>Food
      </div>
    </div>
    <div class="card">
      <h2 class="card-title">I wanted to cry, but I couldn't speak</h2>
      <img class="image" src="https://assets.codepen.io/221808/gallery_5.jpg" width="360" height="240" alt="" />
      <p class="description">
        It is said that these "shosei" would sometimes catch us and boil us
        for food.
      </p>
      <div class="label">
        <span class="material-symbols-outlined">pets</span>Goods
      </div>
    </div>
    <div class="card">
      <h2 class="card-title">It was getting dark, and it was raining</h2>
      <img class="image" src="https://assets.codepen.io/221808/gallery_6.jpg" width="360" height="240" alt="" />
      <p class="description">
        But at the time, I had no idea what to expect
      </p>
      <div class="label">
        <span class="material-symbols-outlined">pets</span>Goods
      </div>
    </div>
  </div>
</main>
<footer class="global-footer">
  <address>Copyright © UNI OF THE DAY TEAM All Rights Reserved.</address>
</footer>
.card-container {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.card {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 12px;
}

/* その他のスタイル */

:root {
  --gray: #f7f5f5;
  --padding: 24px;
  --base-color: #fcfcfc;
  --primary-color: #62b2f7;
  --text-color: #333333;
}

html,
body {
  background-color: var(--base-color);
}

body {
  font-family: "游ゴシック Medium", YuGothic, YuGothicM,
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  padding-top: var(--padding);
  color: var(--text-color);
  gap: var(--padding);
}

.material-symbols-outlined {
  font-size: 20px;
  margin-right: 6px;
  color: var(--primary-color);
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
}

a {
  text-decoration: none;
}

img {
  filter: sepia(10%);
  object-fit: cover;
}

.global-header .brand-title {
  font-family: "Concert One", cursive;
  font-size: 40px;
  text-align: center;
}

.global-header .brand-title b {
  color: var(--primary-color);
}

.label {
  font-weight: bold;
  display: flex;
  align-items: center;
}

.main {
  padding-inline: var(--padding);
}

.card-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

.card {
  border-top: 2px solid var(--primary-color);
  background-color: var(--gray);
  padding-block: 10px;
}

.card :is(.card-title, .description, .label) {
  padding-inline: 12px;
}

.card .card-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  align-self: center;
}

.card .image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.global-footer {
  display: grid;
  padding-top: 30px;
  padding-bottom: 20px;
  color: rgba(255, 255, 255, 0.5);
  background-color: #333333;
  justify-items: center;
}

.global-footer address {
  font-size: 12px;
  font-style: normal;
  padding-right: 16px;
  text-align: right;
}

.no-support-browser {
  display: none;
}

@supports not (grid-template-rows: subgrid) {
  .no-support-browser {
    display: block;
    font-weight: bold;
    color: #f429b4;
    margin-bottom: 16px;
    text-align: center;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.