/* ================================================================
   テーマ別プログラムへの導線（本体TOPの告知バーと帯）
   正は docs/program-design/build_top_review.py の HEAD ブロック。承認済みの
   top-review.html / top-login-review.html と同じ見た目になるよう、
   接頭辞 tp- のまま移設している。本体の共通CSSには混ぜない。
   読み込みは layouts/site.blade.php から、TOPで導線を出すときだけ。
   ---------------------------------------------------------------- */

:root{--tp-paper:#FBF9F5;--tp-band:#F3EFE8;--tp-ink:#3A3632;--tp-ink2:#7A716A;--tp-line:#E4DED4;--tp-teal:#3F7F75;--tp-teal-deep:#2F6560;--tp-serif:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho",serif;--tp-sans:"Noto Sans JP","Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic",Meiryo,sans-serif;--tp-bar-h:44px;--tp-bar-offset:var(--tp-bar-h)}
.tp-bar{position:fixed;left:0;right:0;top:0;z-index:600;height:var(--tp-bar-h);background:var(--tp-teal);color:#fff;font-family:var(--tp-sans);font-size:14px;line-height:1.4;display:flex;align-items:center;justify-content:center;gap:12px;padding:0 48px 0 16px;box-sizing:border-box}
.tp-bar__new{font-size:11px;font-weight:700;letter-spacing:.12em;border:1px solid rgba(255,255,255,.7);border-radius:3px;padding:2px 6px;flex:none}
.tp-bar__text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp-bar__link{color:#fff;text-decoration:underline;text-underline-offset:.2em;white-space:nowrap;font-weight:700}
.tp-bar__close{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;background:transparent;color:#fff;font-size:20px;cursor:pointer;line-height:1}
html.tp-has-bar body{padding-top:var(--tp-bar-offset)}
html.tp-has-bar header{top:var(--tp-bar-offset)!important}
html.tp-has-bar .nav-button-wrap,html.tp-has-bar .spNav{margin-top:var(--tp-bar-offset)}
@media (max-width:640px){.tp-bar{font-size:12px;gap:8px;padding:6px 40px 6px 12px;height:auto;min-height:var(--tp-bar-h)}.tp-bar__text{white-space:normal;overflow:visible;line-height:1.3}}
.tp-quiet{background:var(--tp-paper);border-top:1px solid var(--tp-line);border-bottom:1px solid var(--tp-line);padding:48px 0;font-family:var(--tp-sans);color:var(--tp-ink)}
.tp-quiet__inner{width:min(1080px,100% - 48px);margin-inline:auto;display:grid;grid-template-columns:104px 1fr auto;gap:32px;align-items:center}
.tp-arch{aspect-ratio:4/5;overflow:hidden;border-radius:50% 50% 12px 12px / 40% 40% 12px 12px;background:var(--tp-band)}
.tp-arch img{width:100%;height:100%;object-fit:cover;display:block;transform:scale(1.05)}
.tp-quiet__k{margin:0 0 6px;font-size:12px;letter-spacing:.14em;color:var(--tp-teal)}
.tp-quiet__t{margin:0 0 8px;font-family:var(--tp-serif);font-size:22px;line-height:1.5;font-weight:500}
.tp-quiet__d{margin:0;font-size:14px;line-height:1.8;color:var(--tp-ink2)}
a.tp-quiet__btn{display:inline-block;padding:13px 28px;border-radius:999px;background:var(--tp-teal);color:#fff;font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap;transition:background .2s}
a.tp-quiet__btn:hover{background:var(--tp-teal-deep);color:#fff}
@media (max-width:760px){.tp-quiet{padding:36px 0}.tp-quiet__inner{grid-template-columns:80px 1fr;gap:20px}.tp-quiet__t{font-size:19px}a.tp-quiet__btn{grid-column:1/-1;text-align:center}}

/* ここから下は承認版には無い。
   承認版は .tp-bar の高さを 44px に固定したまま 640px 以下で文字の折り返しを許しており、
   399px など実機の幅では3行になって箱からはみ出し、上下が画面外と本体ヘッダーに隠れていた。
   箱を内容に合わせて伸ばし、押し下げ量（--tp-bar-offset）は head のスクリプトが実高さを入れる。

   1行。×で閉じた状態を7日間保つため、サーバはバーを描画したまま
   head のスクリプトが html に .tp-bar-off を付けて隠す（描画後に消すとちらつくため） */
.tp-bar-off .tp-bar { display: none; }

/* ================================================================
   FVの告知カード（未ログインTOPのキャンペーン枠と同じ位置）
   満足保証キャンペーンは戻す可能性があるため markup を消さず、
   index.blade.php で .tp-fv-off を付けて隠すだけにしている。

   本体CSS（home.css の .index section#mainvisual .mainvisual-content .renewalWrap …）は
   詳細度が高く、短いセレクタでは display も font-size も上書きできない。
   （.renewalWrap .textWrap p は PC で font-size:.8333vw = 12px を当ててくる）
   そのため上書きする宣言はすべて本体と同じ長さのセレクタで書いている。
   ---------------------------------------------------------------- */
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-off,
.index_logged section#mainvisual .mainvisual-content .renewalWrap.tp-fv-off{display:none}

.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on,
.index_logged section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on{
  width:clamp(380px,min(21.875vw,calc(13.9375vw + 140px)),420px);
  /* 既存枠は左右 padding を持たないので content-box のままでよかったが、
     こちらは padding を足すぶん border-box にしないと SP（width:92%）で右にはみ出す */
  box-sizing:border-box;
  padding:20px 30px 18px;
  border-radius:10px;
  background-image:none;
  background-color:var(--tp-teal);
}
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv{
  font-family:var(--tp-sans);color:#fff;text-align:center}
/* 既存枠は h3 を上に -20px 浮かせる前提で textWrap を負のマージンで戻している。
   こちらは h3 を置かないので、その戻しを打ち消す */
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv__text{
  margin:0 0 14px}
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv__text p{
  color:#fff;font-weight:400;margin:0}
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv__text p.tp-fv__date{
  font-size:12px;letter-spacing:.08em;opacity:.9}
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv__text p.tp-fv__title{
  font-size:24px;font-weight:700;line-height:1.4;margin:2px 0 4px}
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv__text p.tp-fv__copy{
  font-size:13px;line-height:1.6}
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .btnWrap{
  margin-bottom:12px}
/* 注記はカード幅（PCで380px＝内寸320px）に1行で収める。
   body の letter-spacing:.06em が効いたままだと「です」だけ2行目に落ちる */
.index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on p.tp-fv__note{
  color:#fff;font-size:10px;font-weight:400;line-height:1.5;letter-spacing:.02em;margin:0;opacity:.9}
@media screen and (max-width:767px){
  .index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on{width:92%;padding:20px 20px 18px}
  .index section#mainvisual .mainvisual-content .renewalWrap.tp-fv-on .tp-fv__text p.tp-fv__title{font-size:21px}
}
