/* =========================================================
   The Red Plague：バイオームページ用バナー
   Subnautica PDA風・共通デザイン
========================================================= */

.biome-banner,
.biome-banner * {
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   バナー全体
--------------------------------------------------------- */

.biome-banner {
  /*
    HTML側のstyle属性で変更可能
  */
  --banner-image: none;
  --banner-position: center;

  /*
    PDA風アクセントカラー
    バイオームごとに上書き可能
  */
  --pda-accent: #e25f70;
  --pda-accent-light: #ffd5dc;
  --pda-accent-dark: #66202c;

  position: relative;
  isolation: isolate;

  display: block;

  width: 100%;
  max-width: 980px;
  aspect-ratio: 4 / 1;

  margin: 24px auto;
  overflow: hidden;

  border:
    1px solid
    color-mix(
      in srgb,
      var(--pda-accent) 40%,
      transparent
    );

  border-radius: 8px;

  background-color: #02090b;

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.58),
    0 0 12px
      color-mix(
        in srgb,
        var(--pda-accent) 10%,
        transparent
      ),
    inset 0 0 22px rgba(0, 0, 0, 0.38);

  color: #fff;
  text-decoration: none;

  cursor: pointer;
}

/* ---------------------------------------------------------
   背景画像
--------------------------------------------------------- */

.biome-banner::before {
  content: "";

  position: absolute;
  z-index: 0;
  inset: 0;

  background-image: var(--banner-image);
  background-position: var(--banner-position);
  background-repeat: no-repeat;
  background-size: cover;

  transform: scale(1.002);

  transition:
    transform 0.55s ease,
    filter 0.55s ease;
}

/* ---------------------------------------------------------
   バナー内側の薄いPDA枠
--------------------------------------------------------- */

.biome-banner::after {
  content: "";

  position: absolute;
  z-index: 5;
  inset: 5px;

  border:
    1px solid
    color-mix(
      in srgb,
      var(--pda-accent) 10%,
      transparent
    );

  border-radius: 5px;

  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.22);

  pointer-events: none;
}

/* ---------------------------------------------------------
   背景オーバーレイ
--------------------------------------------------------- */

.biome-banner__overlay {
  position: absolute;
  z-index: 1;
  inset: 0;

  background:
    /*
      下部を暗くし、タイトルの可読性を確保
    */
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.07) 38%,
      rgba(0, 6, 8, 0.32) 67%,
      rgba(0, 4, 6, 0.76) 100%
    ),

    /*
      左右の自然なビネット
    */
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.34) 0%,
      rgba(0, 0, 0, 0.08) 18%,
      transparent 38%,
      transparent 62%,
      rgba(0, 0, 0, 0.08) 82%,
      rgba(0, 0, 0, 0.34) 100%
    ),

    /*
      タイトル周辺の淡いPDA色
    */
    radial-gradient(
      ellipse at 50% 100%,
      color-mix(
        in srgb,
        var(--pda-accent) 12%,
        transparent
      ) 0%,
      transparent 60%
    );

  pointer-events: none;
}

/* ---------------------------------------------------------
   PDA風タイトルプレート
--------------------------------------------------------- */

.biome-banner__plate {
  position: absolute;
  z-index: 3;

  left: 50%;
  bottom: clamp(9px, 4%, 15px);

  /*
    横幅は以前調整した小さめの比率を維持
  */
  width: min(42%, 430px);

  padding: 1px;

  transform: translateX(-50%);

  /*
    PDA端末の画面を思わせる穏やかな角丸
  */
  border-radius: 12px;

  background:
    linear-gradient(
      90deg,
      color-mix(
        in srgb,
        var(--pda-accent-dark) 48%,
        transparent
      ),
      color-mix(
        in srgb,
        var(--pda-accent) 72%,
        transparent
      ) 18%,
      color-mix(
        in srgb,
        var(--pda-accent-light) 58%,
        transparent
      ) 50%,
      color-mix(
        in srgb,
        var(--pda-accent) 72%,
        transparent
      ) 82%,
      color-mix(
        in srgb,
        var(--pda-accent-dark) 48%,
        transparent
      )
    );

  box-shadow:
    0 7px 15px rgba(0, 0, 0, 0.72),
    0 0 6px
      color-mix(
        in srgb,
        var(--pda-accent) 22%,
        transparent
      );

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* 左右の小さなPDAインジケーター */
.biome-banner__plate::before,
.biome-banner__plate::after {
  content: "";

  position: absolute;
  top: 50%;
  z-index: 4;

  width: 4px;
  height: 14px;

  transform: translateY(-50%);

  border-radius: 4px;

  background:
    color-mix(
      in srgb,
      var(--pda-accent) 75%,
      white 8%
    );

  box-shadow:
    0 0 5px
      color-mix(
        in srgb,
        var(--pda-accent) 55%,
        transparent
      );

  opacity: 0.65;

  pointer-events: none;
}

.biome-banner__plate::before {
  left: -2px;
}

.biome-banner__plate::after {
  right: -2px;
}

/* ---------------------------------------------------------
   タイトルプレート内部
--------------------------------------------------------- */

.biome-banner__plate-inner {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /*
    以前の62～78px程度から、
    およそ3分の2となる42～52pxへ縮小
  */
  min-height: clamp(42px, 4.7vw, 52px);

  padding:
    clamp(5px, 0.55vw, 7px)
    clamp(20px, 2.5vw, 32px)
    clamp(4px, 0.5vw, 6px);

  overflow: hidden;

  border-radius: 11px;

  background:
    /*
      中央付近の淡いガラス反射
    */
    radial-gradient(
      ellipse at 50% 0%,
      color-mix(
        in srgb,
        var(--pda-accent) 10%,
        transparent
      ),
      transparent 58%
    ),

    /*
      PDA画面らしい薄い水平光
    */
    linear-gradient(
      180deg,
      rgba(27, 48, 52, 0.74) 0%,
      rgba(7, 18, 21, 0.9) 50%,
      rgba(2, 9, 11, 0.96) 100%
    );

  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.76),
    inset 0 1px 0
      color-mix(
        in srgb,
        var(--pda-accent-light) 16%,
        transparent
      );

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ---------------------------------------------------------
   PDA画面内の細い走査線
--------------------------------------------------------- */

.biome-banner__plate-inner::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 7px,
      color-mix(
        in srgb,
        var(--pda-accent) 4%,
        transparent
      ) 8px
    );

  opacity: 0.65;

  pointer-events: none;
}

/* ---------------------------------------------------------
   プレート下端の細いインジケーター
--------------------------------------------------------- */

.biome-banner__plate-inner::after {
  content: "";

  position: absolute;

  left: 35%;
  right: 35%;
  bottom: 2px;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      color-mix(
        in srgb,
        var(--pda-accent) 65%,
        transparent
      ),
      var(--pda-accent-light),
      color-mix(
        in srgb,
        var(--pda-accent) 65%,
        transparent
      ),
      transparent
    );

  box-shadow:
    0 0 4px
      color-mix(
        in srgb,
        var(--pda-accent) 50%,
        transparent
      );

  opacity: 0.8;

  pointer-events: none;
}

/* ---------------------------------------------------------
   日本語タイトル
--------------------------------------------------------- */

.biome-banner__title {
  position: relative;
  z-index: 2;

  display: inline-block;

  font-family:
    "Noto Sans JP",
    "Yu Gothic",
    "Meiryo",
    sans-serif;

  /*
    縦幅縮小に合わせて文字も少し小さくする
  */
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.07em;

  color: #f4fdff;

  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.76),
    0 0 5px
      color-mix(
        in srgb,
        var(--pda-accent) 62%,
        transparent
      ),
    0 2px 4px rgba(0, 0, 0, 0.92);

  transition:
    text-shadow 0.3s ease,
    color 0.3s ease;
}

/* ---------------------------------------------------------
   英語字幕
--------------------------------------------------------- */

.biome-banner__subtitle {
  position: relative;
  z-index: 2;

  display: inline-block;

  margin-top: clamp(2px, 0.25vw, 3px);

  font-family:
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 1.0rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.15em;

  color:
    color-mix(
      in srgb,
      var(--pda-accent-light) 82%,
      white 18%
    );

  text-shadow:
    0 0 3px
      color-mix(
        in srgb,
        var(--pda-accent) 42%,
        transparent
      ),
    0 2px 3px rgba(0, 0, 0, 0.9);
}

/* ---------------------------------------------------------
   ホバー
--------------------------------------------------------- */

.biome-banner:hover::before {
  transform: scale(1.03);

  filter:
    brightness(1.06)
    contrast(1.03)
    saturate(1.04);
}

.biome-banner:hover .biome-banner__plate {
  transform:
    translateX(-50%)
    translateY(-1px);

  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.78),
    0 0 9px
      color-mix(
        in srgb,
        var(--pda-accent) 33%,
        transparent
      );
}

.biome-banner:hover .biome-banner__title {
  color: #ffffff;

  text-shadow:
    0 0 3px rgba(255, 255, 255, 0.86),
    0 0 7px
      color-mix(
        in srgb,
        var(--pda-accent) 72%,
        transparent
      ),
    0 2px 4px rgba(0, 0, 0, 0.92);
}

/* ---------------------------------------------------------
   キーボード操作
--------------------------------------------------------- */

.biome-banner:focus-visible {
  outline:
    2px solid
    color-mix(
      in srgb,
      var(--pda-accent) 85%,
      white 15%
    );

  outline-offset: 4px;
}

/* ---------------------------------------------------------
   クリック時
--------------------------------------------------------- */

.biome-banner:active .biome-banner__plate {
  transform:
    translateX(-50%)
    scale(0.99);
}

/* ---------------------------------------------------------
   タブレット
--------------------------------------------------------- */

@media (max-width: 800px) {
  .biome-banner__plate {
    width: min(50%, 390px);
  }
}

/* ---------------------------------------------------------
   スマートフォン
--------------------------------------------------------- */

@media (max-width: 600px) {
  .biome-banner {
    aspect-ratio: 3 / 1;

    margin: 18px auto;

    border-radius: 6px;
  }

  .biome-banner::after {
    inset: 3px;
  }

  .biome-banner__plate {
    bottom: 6px;

    width: min(66%, 310px);

    border-radius: 9px;
  }

  .biome-banner__plate-inner {
    min-height: 39px;

    padding:
      4px
      17px
      4px;

    border-radius: 8px;
  }

  .biome-banner__title {
    font-size: clamp(0.88rem, 4.4vw, 1.15rem);
    letter-spacing: 0.05em;
  }

  .biome-banner__subtitle {
    margin-top: 2px;

    font-size: clamp(0.46rem, 2.25vw, 0.62rem);
    letter-spacing: 0.11em;
  }

  .biome-banner__plate::before,
  .biome-banner__plate::after {
    height: 10px;
  }
}

/* ---------------------------------------------------------
   小型スマートフォン
--------------------------------------------------------- */

@media (max-width: 400px) {
  .biome-banner__plate {
    width: 72%;
  }

  .biome-banner__plate-inner {
    min-height: 37px;

    padding:
      4px
      14px
      3px;
  }

  .biome-banner__title {
    font-size: 0.88rem;
  }

  .biome-banner__subtitle {
    font-size: 0.46rem;
  }
}

/* ---------------------------------------------------------
   動きを減らす設定
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .biome-banner::before,
  .biome-banner__plate,
  .biome-banner__title {
    transition: none;
  }

  .biome-banner:hover::before {
    transform: scale(1.002);
  }

  .biome-banner:hover .biome-banner__plate {
    transform: translateX(-50%);
  }
}


/* =========================================================
   バイオーム個別ページ共通CSS
========================================================= */

.biome-page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.biome-main-image {
  margin-bottom: 1.25rem;
}

.biome-main-image .main-image {
  display: block;
  width: 100%;
}

.biome-page .info-section,
.biome-page .gallery-section,
.biome-page .related-links {
  margin: 2rem 0;
}

.biome-page .info-section > h2,
.biome-page .gallery-section > h2,
.biome-page .related-links > h2 {
  margin-bottom: 1rem;
}

.biome-overview {
  position: relative;
  overflow: hidden;
}

.biome-overview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(98, 217, 232, 0.55), transparent);
}

.biome-info-card,
.biome-subbox,
.strategy-block,
.biome-location-card,
.biome-feature-card {
  border: 1px solid rgba(98, 217, 232, 0.2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 31, 36, 0.72), rgba(3, 13, 16, 0.88));
  box-shadow: inset 0 1px 0 rgba(202, 247, 255, 0.06), 0 7px 18px rgba(0, 0, 0, 0.22);
}

.biome-info-card,
.biome-subbox,
.strategy-block {
  padding: 1rem 1.15rem;
  margin: 1rem 0;
}

.biome-info-card p:first-child,
.biome-subbox p:first-child,
.strategy-block p:first-child,
.biome-location-card p:first-of-type,
.biome-feature-card p:first-of-type {
  margin-top: 0;
}

.biome-info-card p:last-child,
.biome-subbox p:last-child,
.strategy-block p:last-child,
.biome-location-card p:last-child,
.biome-feature-card p:last-child {
  margin-bottom: 0;
}

.biome-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.biome-feature-card {
  padding: 1rem;
}

.biome-feature-card h3,
.biome-subbox h3,
.biome-location-card h3,
.strategy-block h3 {
  margin: 0 0 0.75rem;
  color: #c9f7ff;
}

.threat-subbox {
  border-color: rgba(255, 140, 0, 0.35);
}

.lethal-subbox {
  border-color: rgba(220, 20, 60, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 220, 225, 0.05), 0 0 15px rgba(144, 8, 35, 0.12);
}

.biome-location-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.biome-location-card {
  padding: 1rem 1.1rem;
}

.strategy-block + .strategy-block {
  margin-top: 1.25rem;
}

.strategy-warning {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #ff8c00;
  background: rgba(255, 140, 0, 0.08);
}

.strategy-warning p {
  margin: 0;
}

.strategy-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.6rem;
}

.strategy-steps li + li {
  margin-top: 0.65rem;
}

.spoiler-box {
  border: 1px solid rgba(98, 217, 232, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2, 12, 15, 0.82);
}

.spoiler-box summary {
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-weight: 700;
  color: #c9f7ff;
  background: rgba(20, 64, 72, 0.32);
}

.spoiler-box summary:hover {
  background: rgba(28, 85, 95, 0.38);
}

.spoiler-box[open] summary {
  border-bottom: 1px solid rgba(98, 217, 232, 0.2);
}

.spoiler-body {
  padding: 1rem 1.15rem;
}

.spoiler-body p:first-child {
  margin-top: 0;
}

.spoiler-body p:last-child {
  margin-bottom: 0;
}

.major-spoiler {
  border-color: rgba(220, 20, 60, 0.42);
}

.major-spoiler summary {
  color: #ffd4dc;
  background: rgba(92, 8, 28, 0.34);
}

.major-spoiler summary:hover {
  background: rgba(122, 10, 36, 0.4);
}

.biome-page .gallery figure {
  margin: 0;
}

.biome-page .gallery img {
  cursor: zoom-in;
}

.biome-page .gallery figcaption {
  line-height: 1.55;
}

.back-link {
  margin: 2rem 0;
}

.lightbox button.close,
.lightbox button.prev,
.lightbox button.next {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 850px) {
  .biome-feature-grid,
  .biome-location-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .biome-page {
    width: min(100% - 20px, 1100px);
  }

  .biome-page .info-section,
  .biome-page .gallery-section,
  .biome-page .related-links {
    margin: 1.5rem 0;
  }

  .biome-info-card,
  .biome-subbox,
  .strategy-block,
  .biome-location-card,
  .biome-feature-card,
  .spoiler-body {
    padding: 0.85rem 0.9rem;
  }

  .spoiler-box summary {
    padding: 0.8rem 0.9rem;
  }
}



/* =========================================================
   プレイグ洞窟：簡易マップ
========================================================= */

.plague-cave-map {
  width: min(100%, 620px);
  margin: 2rem auto;

  text-align: center;
}

/* SVG全体 */
.plague-cave-map__svg {
  display: block;

  width: 100%;
  height: auto;

  overflow: visible;

  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

/* 背景 */
.plague-cave-map__background {
  fill: #f3f3f1;

  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 2;
}

/* 洞窟の黒い外枠 */
.plague-cave-map__outline path {
  fill: none;

  stroke: #090909;
  stroke-width: 92;

  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 血のような濃い赤の洞窟部分 */
.plague-cave-map__route path {
  fill: none;

  stroke: #7d1018;
  stroke-width: 72;

  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 赤部分にわずかな内側の明るさを追加 */
.plague-cave-map__route {
  filter:
    drop-shadow(
      inset 0 0 8px rgba(255, 80, 80, 0.2)
    );
}

/* ラベル */
.plague-cave-map__labels {
  font-family:
    "Noto Sans JP",
    "Yu Gothic",
    "Meiryo",
    sans-serif;

  font-size: 26px;
  font-weight: 700;

  fill: #080808;
}

/* ラベルから伸びる線 */
.plague-cave-map__labels line {
  stroke: #080808;
  stroke-width: 4;

  stroke-linecap: round;
}

/* 補助ラベル */
.plague-cave-map__sub-label {
  font-size: 20px;
  font-weight: 600;
}

/* キャプション */
.plague-cave-map figcaption {
  margin-top: 0.9rem;
  padding: 0 0.6rem;

  font-size: 0.9rem;
  line-height: 1.7;

  color: rgba(225, 245, 248, 0.8);
}

/* スマートフォン */
@media (max-width: 600px) {
  .plague-cave-map {
    width: 100%;
    margin: 1.5rem auto;
  }

  .plague-cave-map__labels {
    font-size: 23px;
  }

  .plague-cave-map__sub-label {
    font-size: 18px;
  }

  .plague-cave-map figcaption {
    font-size: 0.82rem;
  }
}

/* =========================================================
   生息する生物：カード一覧
========================================================= */

.fauna-card-grid {
  display: grid;

  /* PCでは横4枚 */
  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 1rem;
  margin-top: 1.25rem;
}

/* カード全体 */
.fauna-card {
  position: relative;
  display: flex;
  flex-direction: column;

  min-width: 0;
  overflow: hidden;

  border: 1px solid rgba(98, 217, 232, 0.24);
  border-radius: 9px;

  background:
    linear-gradient(
      180deg,
      rgba(12, 37, 43, 0.86),
      rgba(3, 14, 17, 0.96)
    );

  box-shadow:
    inset 0 1px 0 rgba(210, 248, 255, 0.06),
    0 7px 17px rgba(0, 0, 0, 0.28);

  color: inherit;
  text-decoration: none;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* 画像部分 */
.fauna-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;
  background: #02090b;
}

.fauna-card__image::after {
  display: none;
}

.fauna-card__image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

/* 脅威度ラベル */
.fauna-card__badge {
  position: absolute;
  z-index: 2;

  right: 7px;
  bottom: 7px;

  padding: 0.22rem 0.48rem;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;

  background: rgba(7, 18, 21, 0.88);

  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;

  color: #c9f7ff;

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* テキスト部分 */
.fauna-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;

  padding: 0.72rem 0.8rem 0.78rem;
}

.fauna-card__body h3 {
  margin: 0;

  font-size: clamp(0.88rem, 1.25vw, 1.05rem);
  line-height: 1.4;

  color: #e8fcff;
}

.fauna-card__body p {
  margin: 0.42rem 0 0;

  font-size: 0.76rem;
  line-height: 1.5;

  color: rgba(218, 242, 246, 0.72);
}

/* =========================================================
   脅威度ごとの色
   変更するのは、基本的にここだけ
========================================================= */

.fauna-card.harmless {
  --threat-color: #8fffd7;
}

.fauna-card.minor {
  --threat-color: #ffd700;
}

.fauna-card.threat {
  --threat-color: #ff8c00;
}

.fauna-card.extreme {
  --threat-color: #ff0000;
}

.fauna-card.lethal {
  --threat-color: #dc143c;
}


/* =========================================================
   全脅威度に共通するデザイン
========================================================= */

.fauna-card.harmless,
.fauna-card.minor,
.fauna-card.threat,
.fauna-card.extreme,
.fauna-card.lethal {
  border-color:
    color-mix(
      in srgb,
      var(--threat-color) 55%,
      transparent
    );
}

.fauna-card.harmless .fauna-card__badge,
.fauna-card.minor .fauna-card__badge,
.fauna-card.threat .fauna-card__badge,
.fauna-card.extreme .fauna-card__badge,
.fauna-card.lethal .fauna-card__badge {
  border-color:
    color-mix(
      in srgb,
      var(--threat-color) 70%,
      transparent
    );

  color: var(--threat-color);

  background:
    color-mix(
      in srgb,
      var(--threat-color) 18%,
      #071215 82%
    );
}


/* ホバー時 */
.fauna-card.harmless:hover,
.fauna-card.minor:hover,
.fauna-card.threat:hover,
.fauna-card.extreme:hover,
.fauna-card.lethal:hover {
  border-color: var(--threat-color);

  box-shadow:
    inset 0 1px 0 rgba(210, 248, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 0 10px
      color-mix(
        in srgb,
        var(--threat-color) 22%,
        transparent
      );
}

/* ホバー */
.fauna-card:hover {
  transform: translateY(-3px);

  border-color: rgba(98, 217, 232, 0.58);

  box-shadow:
    inset 0 1px 0 rgba(210, 248, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 0 10px rgba(98, 217, 232, 0.12);
}

.fauna-card:hover .fauna-card__image img {
  transform: scale(1.045);
  filter: brightness(1.06);
}

.fauna-card.threat:hover {
  border-color: rgba(255, 140, 0, 0.72);
}

.fauna-card.lethal:hover {
  border-color: rgba(220, 20, 60, 0.78);
}

/* キーボード操作 */
.fauna-card:focus-visible {
  outline: 2px solid #62d9e8;
  outline-offset: 3px;
}

/* タブレット：横2枚 */
@media (max-width: 850px) {
  .fauna-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fauna-card__body h3 {
    font-size: 1rem;
  }
}

/* スマートフォン：横1枚 */
@media (max-width: 520px) {
  .fauna-card-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .fauna-card {
    display: grid;
    grid-template-columns: 42% 58%;
  }

  .fauna-card__image {
    height: 100%;
    min-height: 115px;
    aspect-ratio: auto;
  }

  .fauna-card__body {
    justify-content: center;
  }
}

/* 非常に狭い画面では縦型へ戻す */
@media (max-width: 360px) {
  .fauna-card {
    display: flex;
  }

  .fauna-card__image {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

/* =========================================================
   所在地：16:9画像
========================================================= */

.biome-location-overview {
  padding: 0;
  overflow: hidden;
}

.biome-location-overview__image {
  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;
  background: #02090b;
}

.biome-location-overview__image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.biome-location-overview__body {
  padding: 1rem 1.15rem;
}

.biome-location-overview__body p:first-child {
  margin-top: 0;
}

.biome-location-overview__body p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   主要地点カード：16:9画像
========================================================= */

.biome-location-card {
  padding: 0;
  overflow: hidden;
}

.biome-location-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;
  background: #02090b;
}

.biome-location-card__image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

.biome-location-card__body {
  padding: 1rem 1.1rem;
}

.biome-location-card__body h3 {
  margin: 0 0 0.75rem;
  color: #c9f7ff;
}

.biome-location-card__body p:first-of-type {
  margin-top: 0;
}

.biome-location-card__body p:last-child {
  margin-bottom: 0;
}

/* カードにマウスを載せたとき */
.biome-location-card:hover .biome-location-card__image img {
  transform: scale(1.025);
  filter: brightness(1.05);
}


/* =========================================================
   スマートフォン
========================================================= */

@media (max-width: 600px) {
  .biome-location-overview__body,
  .biome-location-card__body {
    padding: 0.85rem 0.9rem;
  }
}

/* =========================================================
   所在地・環境 共通カード
========================================================= */

.biome-location-overview {
  overflow: hidden;

  padding: 0;

  border: 1px solid rgba(98, 217, 232, 0.24);
  border-radius: 10px;

  background:
    linear-gradient(
      180deg,
      rgba(10, 31, 36, 0.78),
      rgba(3, 13, 16, 0.92)
    );

  box-shadow:
    inset 0 1px 0 rgba(202, 247, 255, 0.06),
    0 7px 18px rgba(0, 0, 0, 0.25);
}

/* 16:9画像 */
.biome-location-overview__image {
  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #02090b;
}

.biome-location-overview__image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/* 本文部分 */
.biome-location-overview__body {
  padding: 1rem 1.15rem;
}

.biome-location-overview__body > :first-child {
  margin-top: 0;
}

.biome-location-overview__body > :last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .biome-location-overview {
    border-radius: 8px;
  }

  .biome-location-overview__body {
    padding: 0.85rem 0.9rem;
  }

  .biome-environment-item {
    padding:
      0.75rem
      0
      0.8rem
      1rem;
  }

  .biome-environment-item h3 {
    font-size: 0.94rem;
  }

  .biome-environment-item::before {
    left: 0;
  }
}

/* =========================================================
   地形図
========================================================= */

.biome-map {
  margin: 0;

  overflow: hidden;

  border: 1px solid rgba(98, 217, 232, 0.24);
  border-radius: 10px;

  background: #02090b;

  box-shadow:
    inset 0 1px 0 rgba(202, 247, 255, 0.06),
    0 7px 18px rgba(0, 0, 0, 0.25);
}

/*
  後から入口・経路・施設などの印を
  画像上へ重ねられるよう position: relative を指定
*/
.biome-map__image {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #02090b;
}

.biome-map__image img {
  display: block;

  width: 100%;
  height: 100%;

  /*
    地形図は端を切り落とさないことが重要なので、
    coverではなくcontainを使用
  */
  object-fit: contain;
  object-position: center;
}

/* スマートフォン */
@media (max-width: 600px) {
  .biome-map {
    border-radius: 8px;
  }
}

/* =========================================================
   地形図
========================================================= */

.biome-map {
  margin: 0;
  overflow: hidden;

  border: 1px solid rgba(98, 217, 232, 0.24);
  border-radius: 10px;

  background: #02090b;

  box-shadow:
    inset 0 1px 0 rgba(202, 247, 255, 0.06),
    0 7px 18px rgba(0, 0, 0, 0.25);
}

.biome-map__image {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;
  background: #02090b;
}

.biome-map__image > img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;
}

/* マーカーを重ねる領域 */
.biome-map__markers {
  position: absolute;
  z-index: 2;
  inset: 0;

  pointer-events: none;
}


/* =========================================================
   地図マーカー共通
========================================================= */

.map-marker {
  /*
    個別マーカーのstyle属性で変更する値
  */
  --marker-x: 50%;
  --marker-y: 50%;

  --line-length: 110px;
  --line-angle: 0deg;

  --label-x: 115px;
  --label-y: -16px;

  --marker-color: #7eeaf4;
  --marker-light: #d6fbff;
  --marker-dark: #083c44;

  position: absolute;

  left: var(--marker-x);
  top: var(--marker-y);

  width: 0;
  height: 0;
}


/* =========================================================
   地点を示す発光点
========================================================= */

.map-marker__point {
  position: absolute;
  z-index: 3;

  left: 0;
  top: 0;

  width: 14px;
  height: 14px;

  transform: translate(-50%, -50%);

  border: 2px solid var(--marker-light);
  border-radius: 50%;

  background: var(--marker-color);

  box-shadow:
    0 0 0 4px rgba(0, 8, 11, 0.72),
    0 0 6px var(--marker-color),
    0 0 13px
      color-mix(
        in srgb,
        var(--marker-color) 70%,
        transparent
      );
}

/* 点の中心 */
.map-marker__point::after {
  content: "";

  position: absolute;

  left: 50%;
  top: 50%;

  width: 4px;
  height: 4px;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  background: #ffffff;

  box-shadow:
    0 0 4px #ffffff;
}


/* =========================================================
   発光点から伸びる線
========================================================= */

.map-marker__line {
  position: absolute;
  z-index: 1;

  left: 0;
  top: 0;

  width: var(--line-length);
  height: 2px;

  transform:
    translateY(-50%)
    rotate(var(--line-angle));

  transform-origin: left center;

  background:
    linear-gradient(
      90deg,
      var(--marker-color) 0%,
      color-mix(
        in srgb,
        var(--marker-color) 72%,
        transparent
      ) 75%,
      transparent 100%
    );

  box-shadow:
    0 0 4px
      color-mix(
        in srgb,
        var(--marker-color) 65%,
        transparent
      );
}


/* =========================================================
   地点名
========================================================= */

.map-marker__label {
  position: absolute;
  z-index: 4;

  left: var(--label-x);
  top: var(--label-y);

  display: inline-flex;
  align-items: center;

  min-height: 28px;
  padding: 0.28rem 0.62rem;

  border:
    1px solid
    color-mix(
      in srgb,
      var(--marker-color) 62%,
      transparent
    );

  border-radius: 4px;

  background:
    linear-gradient(
      180deg,
      rgba(7, 24, 28, 0.94),
      rgba(1, 10, 13, 0.96)
    );

  box-shadow:
    inset 0 1px 0 rgba(225, 251, 255, 0.08),
    0 4px 9px rgba(0, 0, 0, 0.58),
    0 0 7px
      color-mix(
        in srgb,
        var(--marker-color) 18%,
        transparent
      );

  font-size: clamp(0.68rem, 1.05vw, 0.88rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.03em;

  color: var(--marker-light);

  text-shadow:
    0 0 4px
      color-mix(
        in srgb,
        var(--marker-color) 45%,
        transparent
      );

  white-space: nowrap;
}

/* 左側の小さなPDAインジケーター */
.map-marker__label::before {
  content: "";

  width: 4px;
  height: 13px;

  margin-right: 0.42rem;

  border-radius: 2px;

  background: var(--marker-color);

  box-shadow:
    0 0 5px
      color-mix(
        in srgb,
        var(--marker-color) 65%,
        transparent
      );
}


/* =========================================================
   マーカー種別ごとの色
========================================================= */

/* 入口・通路など通常地点 */
.map-marker--location {
  --marker-color: #67dfe9;
  --marker-light: #d5fbff;
  --marker-dark: #073d45;
}

/* タブレットキャッシュ */
.map-marker--cache {
  --marker-color: #ffd75e;
  --marker-light: #fff3bd;
  --marker-dark: #51400b;
}

/* 異星人施設 */
.map-marker--facility {
  --marker-color: #71ffb6;
  --marker-light: #d5ffe9;
  --marker-dark: #0a5130;
}

/* ファントム・リヴァイアサン */
.map-marker--danger {
  --marker-color: #dc143c;
  --marker-light: #ffd1da;
  --marker-dark: #5c071b;
}

/* 入口 */
.map-marker--entrance {
  --marker-color: #67dfe9;
  --marker-light: #d5fbff;
}

/* 中央連絡路 */
.map-marker--central-passage {
  --marker-color: #67dfe9;
  --marker-light: #d5fbff;
}

/* タブレットキャッシュ */
.map-marker--tablet-cache {
  --marker-color: #ffd75e;
  --marker-light: #fff3bd;
}

/* 異星人施設 */
.map-marker--alien-facility {
  --marker-color: #71ffb6;
  --marker-light: #d5ffe9;
}

/* ファントム・リヴァイアサン */
.map-marker--phantom-leviathan {
  --marker-color: #dc143c;
  --marker-light: #ffd1da;
}

/* =========================================================
   スマートフォン
========================================================= */

@media (max-width: 600px) {
  .biome-map {
    border-radius: 8px;
  }

  .map-marker__point {
    width: 11px;
    height: 11px;

    border-width: 1px;
  }

  .map-marker__line {
    height: 1px;

    /*
      PC用の線が長すぎる場合に少し縮小
    */
    width:
      calc(
        var(--line-length) * 0.72
      );
  }

  .map-marker__label {
    min-height: 22px;
    padding: 0.2rem 0.4rem;

    font-size: 0.58rem;
  }

  .map-marker__label::before {
    width: 3px;
    height: 9px;

    margin-right: 0.3rem;
  }
}