@charset "utf-8";
/*
 * 庶民のIPO・指定箇所だけの追加CSS
 * 1. ヘッダー：第1案をベースにSNS・おすすめ証券・スマホ1行表示だけ調整
 * 2. 参考記事 .link_s：第2案
 * 3. フッターのInstagram：bg_Instagram.pngを使用
 * そのほかの見出し・本文・目次・表等には変更を加えません。
 */

/* 参考記事：第2案をそのまま採用 */

#page .link_s,
#ipo_list .link_s {
  position: relative;
  background: #edf7f3;
  border: 1px solid #9ecfbc;
  border-left: 4px solid #008c5a;
  border-radius: 3px;
  color: #282828;
  padding: 12px 12px 8px 14px;
  margin: 34px 0 28px;
  box-sizing: border-box;
}

#page .link_s > span,
#ipo_list .link_s > span {
  position: absolute;
  top: -13px;
  left: 9px;
  display: inline-block;
  color: #fff;
  background: #087449;
  border: 1px solid #087449;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  padding: 3px 10px;
}

#page .link_s > ul,
#ipo_list .link_s > ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc outside;
  color: #333;
}

#page .link_s li,
#ipo_list .link_s li {
  color: #282828;
  font-size: 0.94em;
  line-height: 1.7;
  margin: 3px 0 5px;
}

#page .link_s li a,
#ipo_list .link_s li a {
  color: #005db8;
  font-size: 1em;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#page .link_s li a:hover,
#ipo_list .link_s li a:hover {
  color: #00653d;
}


/* フッター：第2案のInstagram装飾＋指定画像 */

.social-area-syncer .tbg_instagram {
  display: inline-block;
  padding: 4px 8px;
  margin-left: 4px;
  border-radius: 3px;
  background-color: #f1eaf0;
  color: #92376d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.social-area-syncer .tbg_instagram:hover {
  background-color: #ecd4e5;
  text-decoration: underline;
}


.social-area-syncer .tbg_instagram::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  vertical-align: middle;
  background: url("../img/bg_Instagram.png") center center / 18px 18px no-repeat;
}

#header a:focus-visible {
  outline: 3px solid #e3a62b;
  outline-offset: 3px;
}

/* ヘッダー：第1案をそのまま採用 */

#header .h_r {
  box-sizing: border-box;
  width: 645px;
  padding-top: 9px;
  padding-right: 12px;
}

#header .h_r .ipo-header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

#header .h_r .ipo-header-text {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  gap: 2px;
  min-height: 35px;
  padding: 5px 9px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
  color: #fff;
  background-color: rgba(5, 92, 49, .53);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 5px;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}

#header .h_r .ipo-header-text:link,
#header .h_r .ipo-header-text:visited {
  color: #fff;
}

#header .h_r .ipo-header-text:hover {
  color: #fff;
  background-color: #087443;
  transform: translateY(-1px);
}

#header .h_r .ipo-header-text.tbg_pazz,
#header .h_r .ipo-header-text.tbg_pazz3 {
  margin: 0;
}

#header .h_r .ipo-header-text::before {
  margin-right: 2px;
  flex: 0 0 auto;
}

/* おすすめ証券：当選実績と同じ画像を仮使用。HTML変更不要 */
#header .h_r .ipo-header-text[href="/syoken/index.html"]::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 22px;
  flex: 0 0 15px;
  background: url("../img/bg_pazz.png") center center / 15px 22px no-repeat;
}

#header .h_r .ipo-header-icons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  margin-left: 4px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(21, 100, 59, .17);
  border-radius: 25px;
  box-shadow: 0 2px 5px rgba(0, 77, 36, .14);
}

/* アイコンは外部ライブラリ・追加画像なしで描画。既存のSNSリンク文字列はHTMLに残す */
#header .h_r .ipo-social-icon {
  font-size: 0;
  white-space: nowrap;
  overflow: hidden;
  margin: 0;
}

.ipo-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ipo-social-icon:hover {
  transform: translateY(-2px);
  background-color: #e8f8ef;
  box-shadow: 0 2px 7px rgba(0,0,0,.17);
}

.ipo-social-icon::before {
  display: block;
  content: "";
  width: 21px;
  height: 21px;
  background-color: currentColor;
  background-image: none; /* 元のtbg_pazz2/tbg_pazz5の画像を打ち消す */
  padding: 0;
  -webkit-mask: var(--ipo-icon) center / contain no-repeat;
  mask: var(--ipo-icon) center / contain no-repeat;
}

.ipo-social-x {
  color: #181818;
  --ipo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18.9 2h3.2l-7 8 8.3 12h-6.5l-5.1-7.4L5.3 22H2.1l7.5-8.6L1.6 2h6.6l4.6 6.8L18.9 2Zm-1.1 17.9h1.8L7.2 4H5.4l12.4 15.9Z'/%3E%3C/svg%3E");
}

.ipo-social-instagram {
  color: #c13584;
  --ipo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2.5' y='2.5' width='19' height='19' rx='5.5' fill='none' stroke='black' stroke-width='2.4'/%3E%3Ccircle cx='12' cy='12' r='4.25' fill='none' stroke='black' stroke-width='2.4'/%3E%3Ccircle cx='17.6' cy='6.5' r='1.4' fill='black'/%3E%3C/svg%3E");
}

.ipo-social-youtube {
  color: #d62329;
  --ipo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M22 7.2a3 3 0 0 0-2.1-2.1C18.1 4.6 12 4.6 12 4.6s-6.1 0-7.9.5A3 3 0 0 0 2 7.2 31 31 0 0 0 1.5 12c0 1.6.2 3.2.5 4.8a3 3 0 0 0 2.1 2.1c1.8.5 7.9.5 7.9.5s6.1 0 7.9-.5a3 3 0 0 0 2.1-2.1c.3-1.6.5-3.2.5-4.8s-.2-3.2-.5-4.8ZM9.7 15.5l6.1-3.5-6.1-3.5v7Z'/%3E%3C/svg%3E");
}

/* ヘッダー既存の「リンクは白文字」指定より優先する */
#header .h_r .ipo-social-icon.ipo-social-x:link,
#header .h_r .ipo-social-icon.ipo-social-x:visited { color: #181818; }
#header .h_r .ipo-social-icon.ipo-social-instagram:link,
#header .h_r .ipo-social-icon.ipo-social-instagram:visited { color: #c13584; }
#header .h_r .ipo-social-icon.ipo-social-youtube:link,
#header .h_r .ipo-social-icon.ipo-social-youtube:visited { color: #d62329; }


#header .h_r ul {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 7px;
}

#header .h_r form {
  text-align: right;
  margin-top: 5px;
}


/* ヘッダー（スマホ）：第1案の指定だけを採用 */
@media screen and (max-width: 796px) {
  /* タイトル画像とその背景の表示設定は元のlayout.cssを維持 */
  #header {
    height: auto;  /* リンク1行分の高さだけ拡張 */
  }

  #header .h_r {
    float: none;
    clear: both;
    display: block;
    width: 100%;
    padding: 6px 5px;
    margin-top: 4px;
    background-color: #f3faf4;
    border-top: 1px solid #d8e8d9;
  }

  #header .h_r .ipo-header-links {
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
  }

  #header .h_r .ipo-header-text {
    color: #23543a;
    background: #fff;
    border: 1px solid #c7ddcc;
    font-size: 12px;
    min-height: 33px;
    padding: 5px 6px;
  }

  #header .h_r .ipo-header-text:link,
  #header .h_r .ipo-header-text:visited {
    color: #23543a;
  }

  #header .h_r .ipo-header-text:hover {
    color: #fff;
    background: #087443;
  }

  /* スマホでは「当選実績」を非表示にして1行に収める */
  #header .h_r .ipo-header-text.tbg_pazz {
    display: none;
  }

  #header .h_r .ipo-header-icons {
    margin-left: 0;
    gap: 3px;
    padding: 2px 4px;
  }

  #header .h_r .ipo-social-icon {
    width: 28px;
    height: 28px;
  }

  #header .h_r .ipo-social-icon::before {
    width: 19px;
    height: 19px;
  }

  #header .h_r ul,
  #header .h_r form {
    display: none;
  }

  /* モバイルでは左右フロートを解除済みのため、空の改行を非表示に */
  #header > br.clean {
    display: none;
  }

}

@media screen and (max-width: 370px) {
  #header .h_r .ipo-header-links { gap: 3px; }
  #header .h_r .ipo-header-text {
    padding: 4px 4px;
    font-size: 11px;
  }
  #header .h_r .ipo-header-icons { gap: 2px; padding: 2px 3px; }
  #header .h_r .ipo-social-icon { width: 26px; height: 28px; }
}

/* 元の320px表示ではロゴ部分が102px高のため、その余白を保持 */
@media screen and (max-width: 348px) {
  #header .h_r { margin-top: 21px; }
}

/* ヘッダーリンクのアニメーション軽減：第1案 */
@media (prefers-reduced-motion: reduce) {
  .ipo-social-icon,
  #header .h_r .ipo-header-text {
    transition: none;
  }
}
