@charset "UTF-8";

/* =============================================================================
   ユーザーボイス（全国の現場から、ひとこと。）
   Figma : 水産DX（運用） /「ユーザーボイス_D1〜D3」（PC）／「ユーザーボイス_sp」（SP）
   common.css の後に読み込む。吹き出しの出現・揺れ（数秒で静止）・入れ替えは voice.js が担当し、
   JS が動かない環境では最初のセットをそのまま表示する。
   1100px 未満は 1 カラム（吹き出し → 地図の順）に積み直す。
   ========================================================================== */

.voice {
  --voice-orange: #FF8800;
  --voice-bubble: #DEEBF7;
  padding: 40px var(--gutter) 0;
  color: #000;
}

/* -----------------------------------------------------------------------------
   1. 見出し（バッジ＋タイトル＋リード）
   -------------------------------------------------------------------------- */
.voice-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 1200px;
  margin-inline: auto;
}

.voice-head__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* 吹き出し形のバッジ（しっぽは装飾） */
.voice-badge {
  position: relative;
  margin-bottom: 15px;
  padding: 8px 15px;
  border-radius: 40px;
  background: var(--voice-orange);
  color: var(--c-white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.voice-badge::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% + 13.5px);
  width: 15px;
  height: 15px;
  background: url("/jp/fisheries/lib/img/common/voice/badge-tail.svg") center / contain no-repeat;
  transform: translateX(-50%) scaleX(-1);
}

.voice-title {
  font-feature-settings: "palt" 1;
  color: var(--c-blue);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}

.voice-lead {
  color: #090B0F;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

/* -----------------------------------------------------------------------------
   2. 吹き出しと地図（SP は 1 カラム）
   -------------------------------------------------------------------------- */
.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13.5px;
  max-width: 1200px;
  margin: 40px auto 0;
}

.voice-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13.5px;
  width: 100%;
}

.voice-map {
  order: 1;
  width: calc(100% + 20px);
  max-width: 370px;
  height: auto;
  margin: -2px 0 0 -20px;
}

/* 地図の波・船・魚の揺れは map.svg 内のアニメーション（SMIL）で動く */

/* 1 つの吹き出し：枠（視差）> ふわふわ > 本体（出現・入れ替え） */
.voice-slot {
  width: 100%;
  max-width: 350px;
}

.voice-slot[hidden] { display: none; }

.voice-card {
  position: relative;
  padding-bottom: 27px;
}

/* 吹き出しのしっぽ（装飾） */
.voice-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 27px;
  height: 28px;
  background: url("/jp/fisheries/lib/img/common/voice/bubble-tail.svg") center / contain no-repeat;
  transform: translateX(-50%);
}

.voice-card__body {
  display: flex;
  align-items: flex-start;
  gap: 10.8px;
  padding: 13.5px;
  border-radius: 18px;
  background: var(--voice-bubble);
}

.voice-card__who {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.voice-card__region {
  width: 72px;
  padding: 4.5px 0;
  border-radius: 12px;
  background: var(--voice-orange);
  color: var(--c-white);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* アバター：地方の背景＋人物を同じセルに重ねる */
.voice-card__avatar {
  display: grid;
  overflow: hidden;
  width: 63px;
  height: 63px;
  border-radius: 50%;
  background: var(--c-faq, #35BCFF);
}

.voice-card__avatar > img { grid-area: 1 / 1; }

.voice-card__avatar .voice-card__bg {
  width: 100%;
  height: 100%;
}

/* 人物はアイコンの 59/70 の大きさで、右下寄りに置く */
.voice-card__avatar .voice-card__chara {
  width: 84.3%;
  height: auto;
  margin: 15.7% 0 0 7.1%;
  object-fit: cover;
}

.voice-card__text {
  flex: 1 1 0;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  word-break: break-word;
}

/* -----------------------------------------------------------------------------
   3. 動き（voice.js が .is-js を付けたときだけ）
   出現・揺れ・退場は voice.js（Web Animations）で付ける。揺れは数秒で止まり、ずっとは動かない。
   ここでは出す前の状態（透明）だけを決めておく。
   -------------------------------------------------------------------------- */
.is-js .voice-card { opacity: 0; }

/* -----------------------------------------------------------------------------
   4. ページ送り（前の 5 件／1 / 2／次の 5 件）
   -------------------------------------------------------------------------- */
.voice-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.voice-pager[hidden] { display: none; }

.voice-pager__btn {
  display: inline-flex;
  flex: 0 1 145px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 30px;
  padding: 0 16px;
  border: 1px solid var(--c-blue);
  border-radius: 120px;
  background: var(--c-white);
  color: var(--c-blue);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

/* 矢印は文字色で塗る（無効時は灰色になる） */
.voice-pager__btn::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("/jp/fisheries/lib/img/common/icon-chevron-right-blue-sm.svg") center / contain no-repeat;
  mask: url("/jp/fisheries/lib/img/common/icon-chevron-right-blue-sm.svg") center / contain no-repeat;
}

.voice-pager__btn--prev::before { transform: scaleX(-1); }

.voice-pager__btn--next::before { order: 1; }

.voice-pager__btn:not(:disabled):hover,
.voice-pager__btn:not(:disabled):focus-visible {
  background: var(--c-blue);
  color: var(--c-white);
}

.voice-pager__btn:disabled {
  border-color: #C4C4C4;
  color: #C4C4C4;
  cursor: default;
}

.voice-pager__count {
  flex: none;
  min-width: 50px;
  color: #090B0F;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

/* -----------------------------------------------------------------------------
   5. 戻るボタン
   -------------------------------------------------------------------------- */
.voice .page-back { margin-top: 50px; }

/* =============================================================================
   6. PC（1100px 以上）：左 3・右 2 の吹き出しの間に地図
   ========================================================================== */
@media (min-width: 1100px) {

  .voice-head { align-items: center; }

  .voice-head__row {
    flex-direction: row;
    align-items: flex-end;
  }

  .voice-badge { width: 142px; }

  .voice-title {
    font-size: 32px;
    white-space: nowrap;
  }

  .voice-lead { text-align: center; }

  /* 地図と左右の列を同じセルに重ねる（地図は背面の装飾） */
  .voice-stage {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr) 390px;
    align-items: start;
    gap: 0;
    min-height: 640px;
    margin-top: 50px;
  }

  .voice-map {
    order: 0;
    grid-area: 1 / 1 / 2 / 4;
    justify-self: center;
    width: 522px;
    max-width: none;
    margin: 0;
  }

  .voice-col { position: relative; }

  .voice-col--left { grid-area: 1 / 1; }

  .voice-col--right {
    grid-area: 1 / 3;
    align-self: center;
  }

  .voice-slot { max-width: 390px; }

  .voice-col { gap: 15px; }

  .voice-card { padding-bottom: 30px; }

  .voice-card::after {
    width: 30px;
    height: 31px;
  }

  .voice-card__body {
    gap: 12px;
    padding: 15px;
    border-radius: 20px;
  }

  .voice-card__who { gap: 10px; }

  .voice-card__region {
    width: 80px;
    padding: 5px 0;
    border-radius: 13px;
    font-size: 14px;
  }

  .voice-card__avatar {
    width: 70px;
    height: 70px;
  }

  .voice-card__text { font-size: 16px; }

  /* ページ送りは吹き出しのすぐ下、戻るボタンはその 50px 下（Figma どおり） */
  .voice-pager { margin-top: 0; }

  .voice .page-back { margin-top: 0; }

  .voice-pager:not([hidden]) + .page-back { margin-top: 50px; }
}
