@charset "UTF-8";
.animation-wrap {
  margin-top: 1em;
}
.animation-box-flex {
  display: flex;
  gap: 1em;
}
.animation-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(100px, calc(100 / 640 * 100vw));
  aspect-ratio: 1 / 1;
  color: #fff;
  background-color: #2cb1dc;
}

a.btn-button {
  display: inline-block;
  padding: 0.5em 1.5em;
  background-color: #2cb1dc;
  color: #fff;
  border-radius: 0.4em;
  opacity: 1;
  transition: transform 0.2s ease, opacity 0.5s, background 0.5s ease;
}
a.btn-button:hover {
  color: #fff;
  transform: translateY(-4px);
  background: #ff0000;
  opacity: 0.8;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 1s ease infinite alternate forwards;
}

a.btn-press {
  display: inline-block;
  padding: 0.5em 1.5em;
  background-color: #2cb1dc;
  color: #fff;
  border-radius: 0.4em;
  opacity: 1;
  transition: transform 120ms cubic-bezier(.2,.8,.2,1);
}
a.btn-press:active {
  color: #fff;
  transform: scale(0.9);
}
a.btn-press:hover {
  color: #fff;
}

/* 共通アニメ */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.item {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlide 1.2s ease infinite alternate forwards;
}

/* スタガー（遅延）を付ける */
.item--delay-1 { animation-delay: 0.8s; }
.item--delay-2 { animation-delay: 1.6s; }
.item--delay-3 { animation-delay: 2.4s; }


@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  width: min(50px, calc(50 / 640 * 100vw));
  aspect-ratio: 1 / 1;
  background-color: #fff;
  border: 4px solid rgba(0,0,0,0.2);
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

.flip {
  perspective: 1000px;
  display: inline-block;
  width: min(300px, calc(300 / 640 * 100vw));
  aspect-ratio: 16 / 9;
  margin: 16px;
  /* キーボードフォーカス時にアウトラインを出す */
  outline: none;
}

/* 回転の中枢 */
.flip__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(.2,.8,.2,1);
}

/* 反転状態（クラスまたは :hover/:focus-within で制御） */
.flip:hover .flip__inner,
.flip:focus-within .flip__inner,
.flip.is-flipped .flip__inner {
  transform: rotateY(180deg);
}

/* 表・裏の面 */
.flip__face {
  position: absolute;
  inset: 0; /* top/right/bottom/left: 0 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 0.2em 0.4em rgba(0,0,0,0.08);
}

/* 表面スタイル */
.flip__face--front {
  background: linear-gradient(180deg,#4cafef,#2b9af6);
  color: #fff;
  padding: 1em;
}

/* 裏面スタイル */
.flip__face--back {
  background: #fff;
  color: #222;
  transform: rotateY(180deg);
  padding: 1em;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.06);
}

/* 内側要素のレイアウト例 */
.flip__content {
  text-align: center;
  padding: 0.5em;
}

/* 小さめのヘッダとテキスト */
.flip__title {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 0.5em;
}
.flip__desc {
  line-height: 1.4;
  font-size: 1em;
  color: rgba(0,0,0,0.75);
}

/* フォーカス時の視認性向上 */
.flip:focus {
  box-shadow: 0 0 0 4px rgba(43,154,246,0.18);
  border-radius: 10px;
}


@keyframes toast-visible {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast {
  width: min(300px, calc(300 / 640 * 100vw));
  color: #fff;
  font-size: 1em;
  background: rgba(34,34,34,0.95);
  border-radius: 0.4em;;
  box-shadow: 0 0.2em 0.4em rgba(0,0,0,0.08);
  padding: 0.2em 1em;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: toast-visible 1.2s ease infinite alternate forwards;
}

/* 表示状態 */
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* 種類別（成功・警告・エラーなど） */
.toast--success { background: linear-gradient(90deg,#27ae60,#2ecc71); }
.toast--info    { background: linear-gradient(90deg,#2d9cdb,#4aa3f0); }
.toast--warn    { background: linear-gradient(90deg,#f39c12,#f1c40f); }
.toast--error   { background: linear-gradient(90deg,#e74c3c,#ff6b6b); }

/* メッセージ内のレイアウト（アイコン+テキストなど） */
.toast__inner {
  display: flex;
  align-items: center;
  gap: 1em;
}
.toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  aspect-ratio: 1 / 1;
  flex: 0 0 2em;
  opacity: 0.95;
  font-weight: 700;
}
.toast__text {
  line-height: 1.4;
  word-break: break-word;
  flex: 1 1 auto;
}

/* 小さなアクセシブル閉じるボタン（任意） */
.toast__close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.95);
  font-size: 1em;
  cursor: pointer;
  padding: 0.2em;
  margin-left: 0.5em;
}

/* prefers-reduced-motion を尊重 */
@media (prefers-reduced-motion: reduce) {
  .toast, .toast--visible {
    transition: none !important;
  }
}