/* ==========================================================================
   WEBSITE DESIGN：ノートパソコンを打つ人の絵（Issue #15）
   見出しの文の打ち込みに合わせて手が動く（typist.js）。枠や箱は付けない
   ========================================================================== */
.web-page .typist {
  width: min(72%, 252px);
  margin: 28px auto 0;
  pointer-events: none;
}

.web-page .typist svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* PC：左に見出しと文、右に人の絵 */
@media (min-width: 900px) {
  .web-page .subpage-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    column-gap: 48px;
    align-items: end;
  }

  .web-page .subpage-header > :not(.typist) {
    grid-column: 1;
  }

  .web-page .typist {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 100%;
    margin: 0;
  }
}

/* 作成スタート欄より上の見出しまわりは、ほかのページより約9割の大きさにする（Issue #74） */
.web-page .subpage-tag {
  font-size: 10px;
}

.web-page .subpage-title-en {
  font-size: 38px;
}

.web-page .subpage-title-ja {
  font-size: 16px;
}

.web-page .subpage-lead {
  font-size: 17px;
  margin-top: 22px;
}

/* ヒアリングへの入口の上に置く案内の文 */
.web-start-note {
  text-align: center;
  font-family: var(--font-japanese);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* 狭い画面では「、」の後ろで折り返す（言葉の途中で折れないように） */
.web-start-note-part {
  display: inline-block;
}

/* 案内の文の上を歩く猫（cat.js、Issue #102）の置き場所。文の幅だけを歩き、足が1行目の字の上に乗るようにする */
.web-start-note-body {
  position: relative;
  display: inline-block;
}

.web-start-note-body .cat-stage {
  bottom: calc(100% - 7px);
}

/* ヒアリングへの入口：左に打ち込まれる文、右にエンターキー */
.web-start {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-bottom: 56px;
}

.web-start-text {
  font-family: var(--font-japanese);
  font-size: 19px;
  letter-spacing: 0.16em;
  color: var(--text-sub);
}

/* キーボードのエンターキー。細い線の枠に、下だけ厚みを付けてキーらしく見せる */
.enter-key {
  flex: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  width: 96px;
  height: 64px;
  padding: 8px 12px 7px;
  border: 1px solid var(--text-primary);
  border-bottom-width: 4px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.12s ease, border-bottom-width 0.12s ease, background 0.2s ease, color 0.2s ease;
}

.enter-key-mark {
  font-family: var(--font-mono);
  font-size: 24px;
  line-height: 1;
}

.enter-key-label {
  align-self: flex-start;
  font-family: var(--font-orbitron);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.enter-key:hover,
.enter-key:focus-visible {
  background: var(--text-primary);
  color: #ffffff;
}

/* 押したとき（クリック、または打ち終わったときの自動の押し込み）：沈み込む */
.enter-key:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  margin-bottom: -3px;
}

.enter-key.is-pressed {
  animation: enter-key-press 0.32s ease-out;
}

@keyframes enter-key-press {
  0%, 100% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(3px);
    border-bottom-width: 1px;
    margin-bottom: -3px;
  }
}

/* スマホ：文とキーを1行に収める */
@media (max-width: 599px) {
  .web-start {
    gap: 16px;
  }

  .web-start-text {
    font-size: 15px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .enter-key {
    width: 80px;
    height: 56px;
  }
}

/* 押すたびに ⏎ から広がる輪 */
.enter-wrap {
  position: relative;
  flex: none;
}

.enter-ripple {
  position: absolute;
  /* ⏎ の中心に合わせる（キーの右上から 20px） */
  right: 20px;
  top: 20px;
  pointer-events: none;
}

.enter-ripple i {
  position: absolute;
  left: -30px;
  top: -30px;
  width: 60px;
  height: 60px;
  border: 1px solid var(--accent-10ya);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.2);
}

.enter-ripple.is-tap i {
  animation: enter-ripple 0.9s ease-out;
}

.enter-ripple.is-tap i:last-child {
  animation-delay: 0.15s;
}

@keyframes enter-ripple {
  0% {
    opacity: 0.9;
    transform: scale(0.2);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

