.top-practice {
  isolation: isolate;
  background: #efd0a1 url("/assets/top-practice-bg.webp") center / cover no-repeat;
  color: #542807;
  padding: clamp(48px, 5.4vw, 104px) 20px;
  text-align: center;
  font-family: var(--font-rounded);
}

.top-practice-inner {
  max-width: 1024px;
  margin-inline: auto;
}

.top-practice-heading {
  isolation: isolate;
  display: flow-root;
  position: relative;
}

.top-practice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.2vw, 24px);
  color: #176815;
  font-family: var(--font-rounded);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 20px;
}

.top-practice-label::before,
.top-practice-label::after {
  content: "";
  width: 32px;
  border-top: 1px solid currentColor;
}

.top-practice h2,
.top-practice-card h3 {
  font-family: "Zen Kaku Gothic New", sans-serif;
}

.top-practice h2 {
  margin: 0;
  font-weight: 900;
  line-height: 1.32;
  word-break: keep-all;
}

.top-practice-nowrap { white-space: nowrap; }
/* 見出しの鉤括弧の余白だけを詰める(このフォントは halt が効かない) */
.top-practice-bracket-open { margin-left: -0.5em; }
.top-practice-bracket-close { margin-right: -0.5em; }

/* カード見出しの黄色い線。ファーストビュー「楽しく学ぶ。」の線(.fv-title-mark)と同じ絵を文字幅に伸ばす */
.top-practice-line {
  position: relative;
  isolation: isolate;
}
.top-practice-line::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 1.244em;
  left: 0;
  right: 0;
  height: .28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 80 3, 200 3, 297 7' fill='none' stroke='%23f2c94c' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") left top / 100% 100% no-repeat;
}
/* ペンで引くように伸ばす。隠すのは JS がクラスを付けてから */
.top-practice-line.is-line-waiting::after,
.top-practice-line.is-line-drawing::after {
  clip-path: inset(0 100% 0 0);
}
.top-practice-line.is-line-drawing::after {
  animation: top-practice-line-draw 0.8s ease-out both;
}
@keyframes top-practice-line-draw {
  to { clip-path: inset(0 0 0 0); }
}

.top-practice-lead {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.15vw, 42px);
  align-items: center;
  margin: 0 0 clamp(24px, 2.3vw, 44px);
}

/* 見出しと同じぼかしを、木目の上の説明文にも敷く */
.top-practice-lead-copy {
  position: relative;
  isolation: isolate;
  text-align: left;
}

.top-practice-lead-copy .top-practice-label { justify-content: flex-start; margin-bottom: 10px; }
.top-practice-lead-copy .top-practice-label::before { display: none; }
.top-practice-lead-copy h2 { margin-bottom: clamp(16px, 1.6vw, 24px); }

.top-practice-lead-copy::before {
  content: "";
  position: absolute;
  /* 木目は左ほど濃いので、ぼかしも左へ広げる */
  inset: -56px -44px -56px -120px;
  z-index: -1;
  background: radial-gradient(ellipse farthest-side, #fff0d0cc 35%, #fff0d08c 70%, transparent 100%);
}

.top-practice-intro {
  margin: 0;
  font-weight: 700;
  line-height: 1.75;
  text-align: left;
  text-wrap: pretty;
  word-break: auto-phrase;
  line-break: strict;
}

.top-practice-intro + .top-practice-intro { margin-top: 0.75em; }

.top-practice-slider { min-width: 0; }

/* PCでは少し下げて、画像の上端を左カラムの上端にそろえる */
@media (width >= 768px) {
  .top-practice-slider { transform: translateY(20px); }
}

/* スワイプはスクロールに任せる。前へ・次へとドットは読みものと共通の部品 */
.top-practice-slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 12px;
}
.top-practice-slides::-webkit-scrollbar { display: none; }
.top-practice-slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}
/* 画像の下端に重ねる帯。文字の部分にだけ色を敷く */
.top-practice-slide figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 8px 12px;
  background: rgb(255 255 255 / 80%);
  color: #111;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}
.top-practice-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-practice-phone-break { display: none; }
.top-practice-slider-controls { margin-top: 8px; }

.top-practice-site-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #e3e1dc;
  color: #595959;
  font-size: 0.8125rem;
}

@media (width < 768px) {
  .top-practice-lead { grid-template-columns: minmax(0, 1fr); }
  .top-practice-slide figcaption { font-size: 0.75rem; }
  .top-practice-phone-break { display: inline; }
  .top-practice-lead-copy::before { inset: -28px -16px -28px -20px; }
}

.top-practice-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.15vw, 42px);
}

.top-practice-card {
  display: grid;
  grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 1.5vw, 28px);
  padding: clamp(16px, 2vw, 36px);
  border-radius: 12px;
  background: #faf5e3;
  box-shadow: 0 12px 24px #87400c23;
  color: #3e1b0c;
  text-align: left;
}

.top-practice-card img {
  mix-blend-mode: multiply;
  width: 100%;
  height: auto;
}

.top-practice-card h3 {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  margin: 0 0 10px;
  font-weight: 900;
  line-height: 1.25;
}

.top-practice-card p {
  font-size: clamp(0.875rem, 1vw, 0.9375rem);
  margin: 0 0 22px;
  font-weight: 700;
  line-height: 1.55;
}

.top-practice-card a {
  display: block;
  padding: 12px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #176815;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.top-practice-card a:hover,
.top-practice-card a:focus-visible {
  background: #eaf0d3;
}

/* ゲームで学ぶ: 見出しの下にゲームの一覧。ポスターは DF Games 一覧の形で 4:3 */
.top-practice-card-games {
  display: block;
}
.top-practice-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.top-practice-card .top-practice-card-heading img {
  flex: none;
  width: auto;
  height: 40px;
}
.top-practice-card .top-practice-card-heading h3 { margin: 0; font-size: clamp(1.25rem, 1.9vw, 1.5rem); transform: translateY(-3px); }
.top-practice-card .top-practice-games-all {
  margin-left: auto; color: #3e1b0c; padding: 0; border: 0; border-radius: 0;
  font-size: 0.75rem; font-weight: 400; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 3px;
}
.top-practice-card .top-practice-games-all:hover { background: none; }
.top-practice-games {
  display: grid;
  gap: 28px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.top-practice-games li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.top-practice-games li + li { padding-top: 28px; border-top: 1px solid #e8e5e0; }
@media (width < 768px) {
  .top-practice-games li { grid-template-columns: 136px minmax(0, 1fr); gap: 16px; }
  .top-practice-game-soon { padding: 3px 6px; font-size: 10px; letter-spacing: 0.04em; }
}
.top-practice-card .top-practice-game {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
}
.top-practice-card .top-practice-game:hover,
.top-practice-card .top-practice-game:focus-visible { background: none; }
.top-practice-game:focus-visible { outline: 3px solid #35562e; outline-offset: 4px; }
/* 遊べるゲームは行全体を押せるようにする。リンクの範囲だけを行まで広げ、タイトルの見た目は変えない */
.top-practice-games li:has(> a.top-practice-game) { position: relative; }
.top-practice-card a.top-practice-game { position: static; }
.top-practice-card a.top-practice-game::after {
  content: "";
  position: absolute;
  inset: 0;
}
.top-practice-game-info svg { pointer-events: none; }
.top-practice-game-paper { display: block; }
.top-practice-game-cover {
  position: relative;
  display: grid;
  place-items: start center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #f5ecd2 url("/assets/games/reception.webp") center / cover no-repeat;
}
/* 受付の絵は縦長。ソファと窓が見える高さで、絵の端の白い縁が出ない大きさにする */
.top-practice-game-cover:not(.is-designer-day) {
  place-items: center;
  background-size: 110% auto;
  background-position: 50% 58%;
}
.top-practice-game-cover.is-designer-day { background-image: url("/assets/games/designer-day-desk.webp"); }
.top-practice-card .top-practice-game-cover img {
  position: relative;
  display: block;
  width: 84%;
  height: auto;
  margin-top: 4%;
  mix-blend-mode: normal;
}
.top-practice-card .top-practice-game-cover:not(.is-designer-day) img {
  width: 90%;
  margin-top: 0;
}
.top-practice-game.is-coming-soon .top-practice-game-cover { filter: grayscale(1); }
/* 押せる画像の左下の矢印 */
.top-practice-game-arrow {
  position: absolute;
  z-index: 3;
  left: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff8e8;
  color: #4d3423;
  box-shadow: 0 1px 3px #4a321f55;
}
.top-practice-game-arrow svg {
  display: block;
  width: 14px;
  height: 14px;
}
.top-practice-game-soon {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 12%;
  padding: 4px 10px;
  background: #4d3423;
  color: #fff8e8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 1px 3px #4a321f55;
  transform: translateX(-50%) rotate(-4deg);
}
.top-practice-game-info { display: flex; flex-direction: column; align-items: flex-start; }
.top-practice-games h4 {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: auto-phrase;
}
.top-practice-card .top-practice-game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.6875rem;
  line-height: 1.4;
}
.top-practice-card .top-practice-game-tags { align-items: center; }
.top-practice-game-new,
.top-practice-game-tag {
  padding: 2px 10px;
  border: 1px solid #2d5a1f;
  border-radius: 999px;
  font-family: Fredoka, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
}
.top-practice-game-new {
  border: 0;
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 10px;
  background: #d0341f;
  color: #fff;
  font-size: 0.625rem;
  line-height: 1.4;
}
.top-practice-game-tag { border: 0; background: #ebe2d6; color: inherit; }
.top-practice-game-time {
  font-family: var(--font-rounded);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0;
  white-space: nowrap;
}
.top-practice-game-time svg {
  transform: translateY(-1px);
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top-practice-card .top-practice-game-text {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.55;
  word-break: auto-phrase;
}

@media (max-width: 760px) {
  .top-practice-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    margin-inline: auto;
  }

  .top-practice-break,
  .top-practice-card p br {
    display: none;
  }
}

/* 実践課題のノートパソコンは本人指定で左右反転 */
.top-practice-card img[src="/assets/top-practice-laptop.webp"] { transform: scaleX(-1); }

.top-practice-task-placeholder { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; background: #d9d9d9; }
.top-practice-task-preview { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #f2f2f2; }
.top-practice-task-preview .challenge-card-screen { display: flex; justify-content: center; padding: 10px; border: 0; background: transparent; }
.top-practice-task-preview .challenge-card-preview { flex: none; }

.top-practice-task-type { font-family: Fredoka, "Kosugi Maru", sans-serif; }

/* 元絵の白い外縁を表示枠の外へ切り出す */
.top-practice-slide-user { overflow: hidden; }
.top-practice-slide-user img { transform: scale(1.1); }
.top-practice-slide-user figcaption { z-index: 1; }

/* 2026-11-21 実践課題で学ぶ(新しい2件)：説明の改行は実践課題一覧のカードと同じく生かす */
.top-practice-games-tasks .top-practice-game-text { white-space: pre-line; }
