/* =========================
   化学用語の地図帳（terms.html 専用）
   ========================= */

/* -------------------------
   ヒーローの微調整
   （ベースの .hero は style.css を利用）
   ------------------------- */

   .terms-hero .hero-title {
    font-size: 2.4rem;
  }
  
  .terms-hero .hero-title span {
    font-size: 1.1rem;
  }
  
  .terms-hero .hero-lead strong {
    color: var(--color-accent);
  }
  
  @media (max-width: 600px) {
    .terms-hero .hero-title {
      font-size: 2rem;
    }
  }
  
  /* 用語ページ用の画像を少しだけ強調 */
  .terms-hero-logo {
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }
  
  /* ふわっとゆっくり浮く */
  .terms-hero .hero-orbit {
    animation-duration: 5.8s;
  }
  
  /* -------------------------
     「このページについて」セクション
     ------------------------- */
  
  .terms-intro {
    margin-top: 2.4rem;
    position: relative;
    overflow: hidden;
  }
  
  /* 角にふんわり光るバブル */
  .terms-intro::before,
  .terms-intro::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.25;
    pointer-events: none;
    animation: float 7s ease-in-out infinite;
  }
  
  .terms-intro::before {
    left: -40px;
    bottom: -35px;
    background: radial-gradient(circle at 30% 30%, #ffe0b2, #ffcc80);
  }
  
  .terms-intro::after {
    right: -50px;
    top: -40px;
    background: radial-gradient(circle at 30% 30%, #b3e5fc, #90caf9);
    animation-duration: 9s;
  }
  
  .terms-intro .section-title {
    margin-bottom: 1.1rem;
  }
  
  .terms-intro-main {
    margin-bottom: 1.2rem;
  }
  
  .terms-intro-main p {
    margin: 0 0 0.7rem;
  }
  
  /* 使い方 3ステップカード */
  .terms-intro-steps {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.9rem;
  }
  
  .terms-step {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    animation: fade-up 0.6s ease-out both;
    position: relative;
  }
  
  .terms-step:nth-child(1) { animation-delay: 0.05s; }
  .terms-step:nth-child(2) { animation-delay: 0.12s; }
  .terms-step:nth-child(3) { animation-delay: 0.19s; }
  
  .terms-step::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(255, 243, 224, 0.9));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  
  .terms-step:hover::before {
    opacity: 1;
  }
  
  .terms-step-circle {
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff9f43, #ff6b35);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.55);
    animation: bounce 1.8s ease-in-out infinite;
  }
  
  .terms-step:nth-child(2) .terms-step-circle {
    animation-delay: 0.25s;
  }
  
  .terms-step:nth-child(3) .terms-step-circle {
    animation-delay: 0.5s;
  }
  
  .terms-step-text h3 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    color: var(--color-blue);
  }
  
  .terms-step-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
  }
  
  /* -------------------------
     用語検索セクション
     ------------------------- */
  
  .terms-search {
    padding: 2.9rem 1.2rem 3.4rem;
    background-color: #e0f7ff;
    background-image:
      radial-gradient(#d0f0ff 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent 55%);
    background-size: 18px 18px, 100% 200%;
  }
  
  .terms-search-inner {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
    animation: fade-up 0.7s ease-out;
    position: relative;
  }
  
  /* 浮いているバブル装飾 */
  .terms-search-inner::before,
  .terms-search-inner::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 0.4;
    z-index: -1;
    animation: bubble 9s ease-in-out infinite;
  }
  
  .terms-search-inner::before {
    background: #ffdac5;
    top: -18px;
    left: 4%;
    animation-delay: 0s;
  }
  
  .terms-search-inner::after {
    background: #b3e5fc;
    bottom: -22px;
    right: 6%;
    animation-delay: 2s;
  }
  
  .terms-search-lead {
    margin: 0 auto 1.7rem;
    font-size: 0.98rem;
  }
  
  /* -------------------------
     入力ボックスまわり
     ------------------------- */
  
  .terms-search-box {
    background-color: #ffffff;
    border-radius: 22px;
    padding: 1.5rem 1.6rem 1.2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    text-align: left;
    position: relative;
    overflow: hidden;
  }
  
  /* 右下に光る丸 */
  .terms-search-box::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffe0b2, #ffcc80);
    opacity: 0.25;
  }
  
  .terms-search-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
  }
  
  .terms-search-label::before {
    content: "🔍";
  }
  
  .terms-input-row {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .terms-input {
    flex: 1 1 220px;
    border-radius: 999px;
    border: 2px solid #bbdefb;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    outline: none;
    transition:
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      background-color 0.15s ease;
    background-color: #f7fbff;
  }
  
  .terms-input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.7);
    background-color: #ffffff;
  }
  
  /* 丸くて元気な検索ボタン */
  .terms-search-button {
    flex: 0 0 auto;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #ff9f43, #ff6b35);
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 107, 53, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition:
      transform 0.15s ease,
      box-shadow 0.15s ease,
      filter 0.15s ease;
  }
  
  .terms-search-button::after {
    content: "→";
    margin-left: 0.4rem;
    font-size: 0.9rem;
  }
  
  .terms-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 107, 53, 0.6);
    filter: brightness(1.02);
  }
  
  .terms-search-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.4);
  }
  
  .terms-search-hint {
    margin: 0.7rem 0 0;
    font-size: 0.8rem;
    color: #777;
  }
  
  /* -------------------------
     サンプル用語チップ
     ------------------------- */
  
  .terms-chip-list {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
  }
  
  .terms-chip-label {
    font-size: 0.8rem;
    color: #777;
    margin-right: 0.2rem;
  }
  
  .terms-chip {
    border: 1px solid #cfd8dc;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    background-color: #f7fbff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition:
      background-color 0.15s ease,
      transform 0.15s ease,
      box-shadow 0.15s ease;
  }
  
  .terms-chip::before {
    content: "#";
    font-size: 0.8rem;
    color: #90a4ae;
  }
  
  .terms-chip:hover {
    background-color: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(144, 202, 249, 0.5);
  }
  
  .terms-chip:active {
    transform: translateY(0);
    box-shadow: none;
  }
  
  /* -------------------------
     メッセージ＆結果表示
     ------------------------- */
  
  .terms-search-message {
    margin: 1.3rem 0 1.1rem;
    font-size: 0.95rem;
  }
  
  .terms-search-message p {
    margin: 0;
  }
  
  .terms-search-message a {
    color: var(--color-blue);
    text-decoration: underline;
  }
  
  /* 検索結果カード */
  .terms-search-result {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .terms-result-card {
    text-align: left;
    padding: 1.1rem 1.2rem 1.1rem;
    border-radius: 16px;
    background-color: #ffffff;
    border-left: 6px solid var(--color-accent);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    animation: fade-up 0.55s ease-out both;
    animation-delay: var(--delay, 0s);
    position: relative;
    overflow: hidden;
    transition:
      transform 0.15s ease,
      box-shadow 0.15s ease;
  }
  
  /* 右上のアクセント丸 */
  .terms-result-card::after {
    content: "";
    position: absolute;
    right: -14px;
    top: -14px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffe0b2, #ffcc80);
    opacity: 0.35;
  }
  
  .terms-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  }
  
  .terms-result-title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
  }
  
  .terms-result-title a {
    text-decoration: none;
    color: var(--color-blue);
  }
  
  .terms-result-title a:hover {
    text-decoration: underline;
  }
  
  .terms-result-meta {
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    color: #666;
  }
  
  .terms-result-desc {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
  }
  
  .terms-result-note {
    margin: 0;
    font-size: 0.83rem;
    color: #777;
  }
  
  .terms-note {
    margin-top: 1.6rem;
    font-size: 0.9rem;
  }
  
  .terms-note p {
    margin: 0;
  }
  
  .terms-note a {
    color: var(--color-blue);
    text-decoration: underline;
  }
  
  /* -------------------------
     レスポンシブ対応
     ------------------------- */
  
  @media (max-width: 768px) {
    .terms-search {
      padding-inline: 1rem;
    }
  
    .terms-search-box {
      padding: 1.2rem 1.2rem 1rem;
    }
  
    .terms-input-row {
      flex-direction: column;
      align-items: stretch;
    }
  
    .terms-search-button {
      width: 100%;
    }
  
    .terms-chip-list {
      margin-top: 0.6rem;
    }
  }
  
  @media (min-width: 720px) {
    /* 少し広い画面では結果カードを2列に */
    .terms-search-result {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  