/* ポップアップ(イベント・お知らせ) — 出典: 旧WP mu-plugin taian-popup.php (wp_footer スタイル) */
#taian-popup-backdrop{
  position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:99998;
  display:none;visibility:hidden;pointer-events:none;align-items:flex-start;justify-content:center;padding:20px;overflow-y:auto;
  font-family:"Pretendard JP",Pretendard,-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP",sans-serif;
  -webkit-font-smoothing:antialiased;animation:tpFade .25s ease;
}
#taian-popup-backdrop.tp-open{display:flex;visibility:visible;pointer-events:auto}

/* outer white frame — 白い枠 + リボンのコンテナ */
#taian-popup-backdrop .tp-frame{
  position:relative;width:100%;max-width:680px;margin:auto;background:#fff;
  padding:10px;border-radius:6px;overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.36);animation:tpPop .32s cubic-bezier(.22,1,.36,1);
}
/* inner card — 青い太枠 */
#taian-popup-backdrop .tp-card{
  position:relative;background:#fff;
  border:11px solid #1A4F6E;border-radius:2px;overflow:hidden;
}

#taian-popup-backdrop .tp-close{
  position:absolute;top:6px;right:8px;background:none;border:0;
  width:36px;height:36px;font-size:26px;line-height:1;color:#94a3b8;
  cursor:pointer;border-radius:6px;z-index:5;transition:background .15s,color .15s;
}
#taian-popup-backdrop .tp-close:hover{background:#f1f5f9;color:#475569}

/* ribbon — tp-card 内 (card の overflow:hidden により青枠にのみ掛かる) */
#taian-popup-backdrop .tp-ribbon{
  position:absolute;top:18px;left:-90px;width:320px;
  background:linear-gradient(180deg,#C12030 0,#A41A28 100%);
  color:#fff;text-align:center;padding:14px 0;transform:rotate(-45deg);
  font-weight:800;font-size:24px;letter-spacing:.5px;
  box-shadow:0 10px 22px rgba(192,32,48,.35);z-index:6;
  white-space:nowrap;overflow:hidden;
}
#taian-popup-backdrop .tp-ribbon::before,
#taian-popup-backdrop .tp-ribbon::after{
  content:"";position:absolute;top:50%;width:8px;height:8px;background:#fff;
  border-radius:50%;transform:translateY(-50%);opacity:.4;
}
#taian-popup-backdrop .tp-ribbon::before{left:30px}
#taian-popup-backdrop .tp-ribbon::after{right:30px}

/* body area */
#taian-popup-backdrop .tp-body-area{padding:34px 40px 6px;text-align:center}

/* 回転灯 — 横をやや + 30% 縮小 (63×53) */
#taian-popup-backdrop .tp-icon{
  margin:0 auto 14px;width:63px;height:53px;line-height:0;
  display:flex;align-items:center;justify-content:center;
}
#taian-popup-backdrop .tp-icon img{width:63px;height:53px;display:block;object-fit:contain}

#taian-popup-backdrop .tp-title{
  margin:0 0 10px;font-size:22px;line-height:1.55;font-weight:800;color:#1A4F6E;letter-spacing:-.3px;
}

#taian-popup-backdrop .tp-body{
  margin:0;font-size:26px;line-height:1.55;color:#C12030;
  word-break:break-word;font-weight:700;letter-spacing:-.3px;
}
#taian-popup-backdrop .tp-body p{margin:0;color:#C12030}
#taian-popup-backdrop .tp-body p + p{margin-top:0}
#taian-popup-backdrop .tp-body mark,
#taian-popup-backdrop .tp-body .tp-hl{
  background:linear-gradient(180deg,transparent 55%,#FFE08A 55%);
  padding:0 2px;color:inherit;font-weight:800;
}

/* 注意文 (カウンターの次の段落) — ボタン色(ダークネイビー)、サイズ拡大 */
#taian-popup-backdrop .tp-body .tp-counter-wrap + p{
  font-size:15.5px !important;
  color:#1A4F6E !important;
  font-weight:600 !important;
  line-height:1.75;
  margin-top:20px !important;
}

/* counter box */
#taian-popup-backdrop .tp-counter-wrap{margin:24px auto 4px;display:flex;justify-content:center}
#taian-popup-backdrop .tp-counter{
  background:#1A4F6E;color:#fff;padding:14px 30px 12px;border-radius:4px;
  display:inline-flex;flex-direction:column;align-items:center;gap:6px;min-width:200px;
}
#taian-popup-backdrop .tp-counter-persons{display:flex;flex-wrap:wrap;justify-content:center;gap:3px}
#taian-popup-backdrop .tp-cnt-person{display:block}
#taian-popup-backdrop .tp-counter-num{
  font-size:30px;font-weight:800;letter-spacing:1px;
  font-variant-numeric:tabular-nums;
  font-family:"SF Mono",Menlo,Consolas,"Courier New",monospace;
  line-height:1.1;
  display:flex;align-items:baseline;justify-content:center;gap:0;width:100%;
}
#taian-popup-backdrop .tp-cd-cur{
  display:inline-block;min-width:1.8em;text-align:center;
  transition:transform .15s ease;
  will-change:transform,filter;
}
#taian-popup-backdrop .tp-cd-cur.tp-tick{
  transform:translateY(-3px);
  filter:drop-shadow(0 2px 4px rgba(255,255,255,.4));
}
#taian-popup-backdrop .tp-cd-slash{margin:0 4px;opacity:.85}
#taian-popup-backdrop .tp-cd-lim{opacity:.9}

/* CTA */
#taian-popup-backdrop .tp-cta{
  display:inline-block;margin-top:16px;padding:13px 36px;
  background:#1A4F6E;color:#fff;border-radius:999px;text-decoration:none;
  font-weight:700;font-size:15px;letter-spacing:.2px;
  box-shadow:0 6px 16px rgba(26,79,110,.28);
  transition:background .15s,transform .15s;
}
#taian-popup-backdrop .tp-cta:hover{background:#143E58;transform:translateY(-1px)}

/* bridges image */
#taian-popup-backdrop .tp-bridges{padding:0 24px 0;line-height:0;position:relative}
#taian-popup-backdrop .tp-bridges img{display:block;width:100%;height:auto;max-height:100px;object-fit:contain}

/* logo footer — 橋の上まで引き上げて重ねる */
#taian-popup-backdrop .tp-logo{
  background:transparent;padding:0 20px 14px;text-align:center;line-height:0;
  margin-top:-44px;position:relative;z-index:2;
}
#taian-popup-backdrop .tp-logo img{max-height:48px;width:auto;display:inline-block}

@keyframes tpFade{from{opacity:0}to{opacity:1}}
@keyframes tpPop{from{opacity:0;transform:translateY(20px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}

@media(max-width:560px){
  #taian-popup-backdrop{padding:12px}
  #taian-popup-backdrop .tp-frame{padding:5px}
  #taian-popup-backdrop .tp-card{border-width:6px}
  #taian-popup-backdrop .tp-body-area{padding:22px 18px 4px}
  #taian-popup-backdrop .tp-ribbon{top:12px;left:-86px;width:240px;font-size:16px;padding:8px 0}
  #taian-popup-backdrop .tp-icon{width:46px;height:38px;margin-bottom:10px}
  #taian-popup-backdrop .tp-icon img{width:46px;height:38px}
  #taian-popup-backdrop .tp-title{font-size:15px}
  #taian-popup-backdrop .tp-body{font-size:16px;line-height:1.5}
  #taian-popup-backdrop .tp-body .tp-counter-wrap + p{font-size:12px !important;margin-top:14px !important;line-height:1.6}
  #taian-popup-backdrop .tp-counter-wrap{margin:16px auto 4px}
  #taian-popup-backdrop .tp-counter{padding:10px 18px 8px;min-width:160px;gap:4px}
  #taian-popup-backdrop .tp-counter-persons{gap:2px}
  #taian-popup-backdrop .tp-cnt-person{width:13px;height:15px}
  #taian-popup-backdrop .tp-counter-num{font-size:20px}
  #taian-popup-backdrop .tp-cta{padding:10px 22px;font-size:13px}
  #taian-popup-backdrop .tp-bridges{padding:0 14px 0}
  #taian-popup-backdrop .tp-bridges img{max-height:60px}
  #taian-popup-backdrop .tp-logo{padding:0 14px 10px;margin-top:-26px}
  #taian-popup-backdrop .tp-logo img{max-height:32px}
}

/* ════════════ お知らせ型 (notice style) ════════════ */
#taian-popup-backdrop.tp-style-notice .tp-frame{
  background:#fff;padding:0;border-radius:18px;max-width:540px;
}
#taian-popup-backdrop.tp-style-notice .tp-card{
  border:8px solid #0047AB;border-radius:16px;
  padding:0;background:#fff;
}
#taian-popup-backdrop.tp-style-notice .tp-body-area{
  padding:44px 40px 10px;text-align:center;
}
/* ! マーク */
#taian-popup-backdrop.tp-style-notice .tp-notice-mark{
  width:46px;height:46px;margin:0 auto 22px;border-radius:50%;
  background:#0047AB;display:flex;align-items:center;justify-content:center;
}
#taian-popup-backdrop.tp-style-notice .tp-notice-mark span{
  color:#fff;font-size:28px;font-weight:800;line-height:1;
}
/* 本文の基本 (黒の挨拶/案内文) */
#taian-popup-backdrop.tp-style-notice .tp-body{
  color:#222;font-size:18px;font-weight:700;line-height:1.95;letter-spacing:.01em;
}
#taian-popup-backdrop.tp-style-notice .tp-body p{margin:0 0 4px;color:#222}
/* 最初の挨拶段落だけ大きく (他の本文 18px に対し +4px) */
#taian-popup-backdrop.tp-style-notice .tp-body > p:first-child{font-size:22px;line-height:1.7}
/* 横の区切り線: <hr> または空段落で表現 */
#taian-popup-backdrop.tp-style-notice .tp-body hr{
  border:0;border-top:2px solid #9aa6b5;width:64px;margin:22px auto;
}
/* 青の強調段落: <strong> で囲んだ段落 → クラス .tp-n-blue */
#taian-popup-backdrop.tp-style-notice .tp-body .tp-n-blue{
  color:#0047AB;font-weight:800;font-size:17px;
}
/* 期間ボックス: .tp-n-period */
#taian-popup-backdrop.tp-style-notice .tp-body .tp-n-period{
  background:#0047AB;color:#fff;border-radius:0;
  padding:12px 14px;margin:22px auto 18px;max-width:500px;
  font-size:15px;font-weight:700;line-height:1.7;white-space:nowrap;
}
#taian-popup-backdrop.tp-style-notice .tp-body .tp-n-period .tp-n-period-ttl{
  display:block;font-size:14.5px;font-weight:800;opacity:.95;margin-bottom:2px;
}
/* ロゴ */
#taian-popup-backdrop.tp-style-notice .tp-logo{
  margin-top:0;padding:6px 20px 30px;
}
#taian-popup-backdrop.tp-style-notice .tp-logo img{max-height:38px}
/* 閉じるボタンの色 */
#taian-popup-backdrop.tp-style-notice .tp-close{color:#9aa6b5}
/* PC: 540px → 440px 全体を同じ比率で縮小 (文字・余白・枠線・ロゴも一緒に) */
@media(min-width:561px){
  #taian-popup-backdrop.tp-style-notice .tp-frame{zoom:.815}
}

@media(max-width:560px){
  /* 10/12 指示: スマホではお知らせ型を 20% 小さく(zoom だけでは width:100% が親基準のまま広がるので幅も 80% に) */
  #taian-popup-backdrop.tp-style-notice .tp-frame{border-radius:14px;zoom:.8;width:80%}
  #taian-popup-backdrop.tp-style-notice .tp-card{border-width:5px;border-radius:12px}
  #taian-popup-backdrop.tp-style-notice .tp-body-area{padding:34px 22px 8px}
  #taian-popup-backdrop.tp-style-notice .tp-notice-mark{width:40px;height:40px;margin-bottom:18px}
  #taian-popup-backdrop.tp-style-notice .tp-notice-mark span{font-size:24px}
  #taian-popup-backdrop.tp-style-notice .tp-body{font-size:15.5px;line-height:1.85}
  #taian-popup-backdrop.tp-style-notice .tp-body .tp-n-blue{font-size:11px;line-height:1.7}
  #taian-popup-backdrop.tp-style-notice .tp-body > p:first-child{font-size:19.5px;line-height:1.6}
  #taian-popup-backdrop.tp-style-notice .tp-body .tp-n-period{font-size:11px;padding:10px 8px;margin:18px auto 14px;max-width:100%;white-space:normal;word-break:keep-all;overflow-wrap:anywhere}
  #taian-popup-backdrop.tp-style-notice .tp-body .tp-n-period .tp-n-period-ttl{font-size:13.5px}
  #taian-popup-backdrop.tp-style-notice .tp-logo{padding:4px 14px 22px}
  #taian-popup-backdrop.tp-style-notice .tp-logo img{max-height:30px}
}
