/* ======================================================================
   Kyoto Red Data Book Template - edit.css
   Project: Kyoto Prefecture Red Data Book (Kyoto RDB)
   Purpose: テンプレート共通の本文エリアスタイル（PC版）
   Placement: /shared/templates/[テンプレートID]/style/edit.css
   ====================================================================== */

@charset "utf-8";

/* ------------------------------
   Common Section Styles
   ------------------------------ */
/* Subtle gradient banner with adequate contrast for overlaid text */
.rdb2026-gradient-bg {
  background: linear-gradient(90deg, var(--color-kyoto-purple-100), #ffffff);
  border-bottom: 1px solid var(--color-border);
}

/* Main wrapper */
.section {
  padding: clamp(32px, 6vw, 72px) 0;
}

/* A contained section style, like a large card */
.section--contained {
  background: var(--color-surface);
  border: 1px solid var(--krb-line);
  border-radius: calc(var(--krb-radius) * 1.2);
  padding: clamp(28px, 4vw, 48px);
}

.section--contained .h2 {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--krb-line);
}

/* ------------------------------
   Cards
   ------------------------------ */
.rdb2026-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-darker);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.card {
  background: var(--krb-surface);
  border: 1px solid var(--color-border-darker);
  border-radius: var(--krb-radius);
  box-shadow: var(--krb-shadow);
}
.card__head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--krb-line);
}
.card__body {
  padding: 1rem;
}

.rdb2026-intro-card p {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
}

/* ------------------------------
   Section Titles
   ------------------------------ */
/* Section title with accent underline */
.rdb2026-section-title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-3);
  padding-bottom: 0.35rem;
  border-bottom: 4px solid var(--color-kyoto-purple-700);
}

/* Category card contents */
.rdb2026-category-title {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.25rem;
}
.rdb2026-category-desc {
  font-size: 0.9375rem;
  color: var(--color-muted-text);
}

/* ------------------------------
   Status Badge
   ------------------------------ */
/* Coming soon badge */
.rdb2026-status {
  /* The margin is now applied directly here instead of inline style */
  margin-top: 0.5rem;
}
.cat-item .rdb2026-status {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  border-radius: 999px;
  background: var(--color-rdb-red-100);
  color: var(--color-rdb-red-700);
}

/* ------------------------------
   Buttons
   ------------------------------ */
.btn {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--krb-radius);
  text-decoration: none;
}
.btn--primary {
  background: var(--color-kyoto-purple-700);
  color: #fff;
  box-shadow: var(--krb-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.btn--primary:visited {
  color: #fff; /* visited状態でも白テキストを維持 */
}
.btn--ghost {
  background: transparent;
  color: var(--color-kyoto-purple-700);
  border: 1px solid var(--color-kyoto-purple-200);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Link style button */
.rdb2026-link-btn {
  display: inline-block;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-kyoto-purple-700);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  background: #fff;
}
.rdb2026-link-btn:hover,
.rdb2026-link-btn:focus-visible {
  background: var(--color-kyoto-purple-100);
}
/* Add margin for adjacent link buttons */
.rdb2026-link-btn + .rdb2026-link-btn {
  margin-top: var(--space-2);
}

/* ------------------------------
   Hero (トップページ用)
   ------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  border-radius: calc(var(--krb-radius) * 1.2);
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-kyoto-purple-100), #fff);
  border: 1px solid var(--color-kyoto-purple-200);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: min(5vw, 50px);
  align-items: center;
  padding: clamp(28px, 4.5vw, 72px);
}

.hero__media {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--krb-radius);
  overflow: hidden;
  background: var(--color-kyoto-purple-200);
}
.hero__media .slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend: multiply;
  filter: saturate(0.9);
  opacity: 0;
  animation: hero-image-fade 20s infinite;
}

/* Stagger animation delays for each slide item */
.hero__media .slide-item:nth-child(2) {
  animation-delay: -15s;
}
.hero__media .slide-item:nth-child(3) {
  animation-delay: -10s;
}
.hero__media .slide-item:nth-child(4) {
  animation-delay: -5s;
}

@keyframes hero-image-fade {
  0% {
    opacity: 0;
  }
  12.5% {
    opacity: 1;
  } /* Fade in */
  25% {
    opacity: 1;
  } /* Hold */
  37.5% {
    opacity: 0;
  } /* Fade out */
  100% {
    opacity: 0;
  }
}

.hero__lead {
  margin-top: 1rem;
}
.hero__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ------------------------------
   Category Grid (トップページ用)
   ------------------------------ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.cat-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--krb-radius);
  padding: var(--space-5) var(--space-3);
  border: 1px solid var(--krb-line);
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.2s ease;
}
.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--krb-shadow);
}
.cat-item:hover .cat-item__icon {
  transform: scale(1.1);
}

.cat-item__icon {
  margin-bottom: var(--space-3);
  transition: transform 0.2s ease-out;
}
.cat-item__icon svg {
  stroke-width: 1.5;
}

.cat-item__title {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-regular); /* 400 */
  margin-bottom: 0.5rem;
}
.cat-item--animal {
  background: var(--cat-animal-weak);
}
.cat-item--animal:hover {
  background: #e9dccc;
}
.cat-item--animal .cat-item__icon {
  color: var(--cat-animal-text);
}

.cat-item--geo {
  background: var(--cat-geo-weak);
}
.cat-item--geo:hover {
  background: #dbe1e7;
}
.cat-item--geo .cat-item__icon {
  color: var(--cat-geo-text);
}

.cat-item--flora {
  background: var(--cat-flora-weak);
}
.cat-item--flora:hover {
  background: #d5e2d8;
}
.cat-item--flora .cat-item__icon {
  color: var(--cat-flora-text);
}

.cat-item--eco {
  background: var(--cat-eco-weak);
}
.cat-item--eco:hover {
  background: #cce2e8;
}
.cat-item--eco .cat-item__icon {
  color: var(--cat-eco-text);
}

/* ------------------------------
   Category Badge
   ------------------------------ */
.badge {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, 0.02);
}
.badge--animal {
  color: var(--cat-animal-text);
}
.badge--geo {
  color: var(--cat-geo-text);
}
.badge--flora {
  color: var(--cat-flora-text);
}
.badge--eco {
  color: var(--cat-eco-text);
}

/* ------------------------------
   Tabs (JS連動用)
   ------------------------------ */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.tab {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-kyoto-purple-200);
  cursor: pointer;
}
.tab[aria-selected="true"],
.tab.is-active {
  background: var(--color-kyoto-purple-700);
  color: #fff;
  border-color: transparent;
}

/* ------------------------------
   Kyoto RDB Category Grid (トップページ用)
   ------------------------------ */
:root {
  /* category color pairs */
  --rdb-wildlife-dark: #6e4c2e;
  --rdb-wildlife-light: #efe4d8;

  --rdb-geo-dark: #5a6473;
  --rdb-geo-light: #e4e8ee;

  --rdb-flora-dark: #2f6e3b;
  --rdb-flora-light: #dfe9e2;

  --rdb-eco-dark: #2c6a7b;
  --rdb-eco-light: #d8e9ee;

  /* common */
  --rdb-ink: #333638;
  --rdb-ink-soft: #5c665d;
  --rdb-paper: #fdfcf7;
  --rdb-radius: 20px;
  --rdb-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --rdb-shadow-hover: 0 10px 36px rgba(0, 0, 0, 0.12);
}

.rdb-cats {
  padding: clamp(24px, 4vw, 48px) 20px;
  background: var(--rdb-paper);
  margin-top: 40px;
  border-radius: var(--rdb-radius);
}
.rdb-cats__title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 28px);
  text-align: center;
  margin: 0 0 25px;
  color: var(--rdb-ink);
}

.rdb-search {
  max-width: 600px;
  margin: 24px auto 32px;
}

/* 検索フォームの上の余白を調整 (トップページ用) */
.rdb2026 .rdb-search {
  margin-top: 1rem;
}

.rdb-search__form {
  display: flex;
  border: 1px solid var(--color-kyoto-purple-200);
  border-radius: var(--krb-radius);
  overflow: hidden;
  box-shadow: var(--krb-shadow);
  background-color: #fff;
}

.rdb-search__input {
  flex-grow: 1;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  background: transparent;
  color: var(--rdb-ink);
  min-width: 0;
}
.rdb-search__input:focus {
  outline: none;
}

.rdb-search__button {
  border: none;
  background-color: var(--color-kyoto-purple-700);
  color: white;
  padding: 0 24px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
}

.rdb-cats__grid {
  --gap: clamp(14px, 2vw, 20px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0;
  margin: 0 auto;
  list-style: none;
  max-width: 1100px;
}

.rdb-card {
  position: relative;
  border-radius: var(--rdb-radius);
  overflow: visible;
  box-shadow: var(--rdb-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.75),
    rgba(255, 255, 255, 0.95)
  );
  isolation: isolate;
}
.rdb-card:focus-within,
.rdb-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rdb-shadow-hover);
}

.rdb-card__link {
  position: relative;
  display: flex;
  flex-direction: column;
  /* justify-content: center; */ /* Remove vertical centering */
  min-height: 120px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.rdb-card__icon {
  position: absolute;
  left: -8px;
  top: -16px;
  transform: none;
  width: 72px;
  height: 72px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.rdb-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rdb-card__body {
  position: relative;
  padding-left: 48px;
}

.rdb-card__title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.1vw, 22px);
  margin: 0 0 6px;
  line-height: 1.3;
}
.rdb-card__desc {
  font-size: 14px;
  color: var(--rdb-ink-soft);
  margin: 0;
  line-height: 1.6;
}

.rdb-card__badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  padding: 0.35em 0.7em;
  border-radius: 0;
  background: #222;
  color: #fff;
}

/* --- category accents (left border ribbon + soft wash) --- */
.rdb-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cat-wash, transparent);
  opacity: 0.28;
  pointer-events: none;
}
.rdb-card::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 8px;
  border-radius: 0 0 0 var(--rdb-radius);
  background: var(--cat-dark, #0003);
  pointer-events: none; /* Add this to allow clicks to pass through */
  opacity: 0.85;
}

/* wildlife */
.rdb-card--wildlife {
  --cat-dark: var(--rdb-wildlife-dark);
  --cat-light: var(--rdb-wildlife-light);
  --cat-wash: radial-gradient(
    120% 100% at 20% 20%,
    var(--rdb-wildlife-light),
    transparent 60%
  );
}
.rdb-card--wildlife .rdb-card__title {
  color: var(--rdb-wildlife-dark);
}

/* geology */
.rdb-card--geo {
  --cat-dark: var(--rdb-geo-dark);
  --cat-light: var(--rdb-geo-light);
  --cat-wash: radial-gradient(
    120% 100% at 20% 20%,
    var(--rdb-geo-light),
    transparent 60%
  );
}
.rdb-card--geo .rdb-card__title {
  color: var(--rdb-geo-dark);
}

/* flora & fungi */
.rdb-card--flora {
  --cat-dark: var(--rdb-flora-dark);
  --cat-light: var(--rdb-flora-light);
  --cat-wash: radial-gradient(
    120% 100% at 20% 20%,
    var(--rdb-flora-light),
    transparent 60%
  );
}
.rdb-card--flora .rdb-card__title {
  color: var(--rdb-flora-dark);
}

/* ecosystem */
.rdb-card--eco {
  --cat-dark: var(--rdb-eco-dark);
  --cat-light: var(--rdb-eco-light);
  --cat-wash: radial-gradient(
    120% 100% at 20% 20%,
    var(--rdb-eco-light),
    transparent 60%
  );
}
.rdb-card--eco .rdb-card__title {
  color: var(--rdb-eco-dark);
}

/* keyboard focus */
.rdb-card__link:focus-visible {
  outline: 2px solid var(--cat-dark);
  outline-offset: 3px;
  border-radius: calc(var(--rdb-radius) - 2px);
}

.rdb-cats__grid li:nth-child(11) .rdb-card__link {
  --icon: url("/images/rdb/icons/seawater-shell.svg");
}

/* ------------------------------
   Forms (do not style `form` tag directly per CMS notes)
   ------------------------------ */
.rdb-form-control {
  width: 100%;
  max-width: 36rem;
}
.rdb-input,
.rdb-select,
.rdb-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #cfcfd6;
  border-radius: 0.5rem;
  background: #fff;
  font: inherit;
}
.rdb-input:focus-visible,
.rdb-select:focus-visible,
.rdb-textarea:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}
.rdb-help {
  display: block;
  font-size: 0.875rem;
  color: var(--color-muted-text);
  margin-top: 0.25rem;
}

/* ------------------------------
   Editable Region Styles (#tmp_contents)
   ------------------------------ */
/* --- Homepage Hero --- */
#tmp_contents .hero {
  /* This selector is already defined above, so it's removed from here. */
}

/* --- Sub-page Intro Banner --- */
#tmp_contents .intro-banner {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4rem) var(--space-4);
  margin-bottom: var(--space-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-align: left; /* テキストを左寄せに変更 */
  isolation: isolate;
}

/* Dark overlay for text readability */
#tmp_contents .intro-banner::before {
  content: "";
  position: absolute;
  inset: 0; /* カバーを削除 */
  background: none;
  z-index: -1;
}

#tmp_contents .intro-banner__content {
  max-width: 680px;
  margin: 0 auto 0 0; /* コンテンツブロックを左に配置 */
}

#tmp_contents .intro-banner__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 var(--space-3);
}

#tmp_contents .intro-banner__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text); /* 説明文だけを黒色で上書き */
  margin: 0;
}

/* --- Animal Category Theme --- */
.cat-animal .intro-banner {
  background-image: url("/shared/site_rdb/images/01_animals/top-banner.jpg");
  color: var(--cat-animal-text);
}

/* --- Ecosystem Category Theme --- */
.cat-eco .intro-banner {
  background-color: var(--cat-eco-weak);
  color: var(--cat-eco-text);
}
.cat-eco .intro-banner__title {
  color: var(--cat-eco-text);
}

/* --- Sub-category Grid --- */
#tmp_contents .category-nav {
  margin-top: 2.5rem; /* 40px: 上のバナーとの間隔を調整 */
  margin-bottom: 3.5rem; /* 56px: 下のフッターとの間隔を調整 */
}
#tmp_contents .category-nav .h2 {
  text-align: center;
  margin-bottom: var(--space-5);
}
#tmp_contents .subcat-grid {
  display: grid;
  grid-template-columns: repeat(
    4,
    minmax(0, 240px)
  ); /* PCで4列表示、ただしカード幅が広がりすぎないように制限 */
  justify-content: center; /* 最後の行のアイテムを中央揃えにする */
  gap: 3rem var(--space-5); /* 上下の間隔を48pxに、左右の間隔を24pxに設定 */
  list-style: none;
  padding: 0;
  margin: 0;
}
#tmp_contents .subcat-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

#tmp_contents .subcat-card:hover,
#tmp_contents .subcat-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  outline: none;
}

#tmp_contents .subcat-card__icon {
  width: 1em;
  height: 1em;
  margin-left: 0.2em; /* タイトルと矢印の間のスペース */
  flex-shrink: 0;
  background-color: currentColor; /* 親要素のcolorを継承するように変更 */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'%3E%3C/path%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#tmp_contents .subcat-card:hover .subcat-card__icon {
  transform: translateX(2px);
  background-color: var(--color-link);
}

#tmp_contents .subcat-card__icon--top {
  width: 100%;
  aspect-ratio: 14 / 1; /* カード幅に合わせて高さを調整 */
  margin: 0;
  border-bottom: 1px solid var(--color-border);
  transition: transform 0.2s ease;
}
#tmp_contents .subcat-card__icon--top img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像がコンテナを覆うように調整 */
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

#tmp_contents .subcat-card:hover .subcat-card__icon--top {
  transform: scale(1.1);
}

#tmp_contents .subcat-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-3);
}

#tmp_contents .subcat-card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem; /* カードサイズに合わせて調整 */
  font-weight: 600;
  margin: 0;
}

/* --- Animal Category Theme --- */
.cat-animal .subcat-card__title,
.cat-animal .subcat-card__title-wrapper {
  color: var(--cat-animal-text);
}
.cat-animal .related-links__icon {
  background-color: var(--cat-animal);
}

/* --- Flora Category Theme --- */
.cat-flora .intro-banner {
  background-image: url("/shared/site_rdb/images/02_plants-fungi/plants-fungi-banner.png"); /* 植物・菌類ページ用のバナー画像 */
  color: var(--cat-flora-text);
}
.cat-flora .intro-banner__title {
  color: var(--cat-flora-text);
}
.cat-flora .subcat-card__title,
.cat-flora .subcat-card__title-wrapper,
.cat-flora .related-links__icon {
  color: var(--cat-flora-text);
}
.cat-flora .related-links__icon {
  background-color: var(--cat-flora);
}

#tmp_contents .subcat-card__desc {
  font-size: 0.8125rem; /* 説明文のフォントサイズを調整 */
  color: var(--color-muted-text);
  line-height: 1.6;
  margin: 0;
}

#tmp_contents .subcat-card__title-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: var(--space-3); /* 画像との間に余白を追加 */
  gap: 0.4em;
}

/* --- Related Links Section --- */
#tmp_contents .related-links {
  position: relative;
  z-index: 1;
  /* パネル化してセクションを明確にする */
  margin-top: var(--space-6);
  padding: var(--space-5);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-darker);
}

#tmp_contents .related-links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

#tmp_contents .related-links__card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border-darker); /* 境界線を維持 */
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#tmp_contents .related-links__card:hover,
#tmp_contents .related-links__card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md); /* ホバー時の影を少し強調 */
  color: var(--color-link);
  outline: none;
}

#tmp_contents .related-links__icon {
  flex-shrink: 0;
  width: 2em;
  height: 2em;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Icon definitions */
#tmp_contents .related-links__icon[data-icon="document"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3C/svg%3E");
}
#tmp_contents .related-links__icon[data-icon="list"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='8' y1='18' x2='21' y2='18'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'%3E%3C/line%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='8' y1='18' x2='21' y2='18'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'%3E%3C/line%3E%3C/svg%3E");
}
#tmp_contents .related-links__icon[data-icon="book"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'%3E%3C/path%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'%3E%3C/path%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'%3E%3C/path%3E%3C/svg%3E");
}
