/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Custom child theme for Astra (Atatter front-end)
Author: 博和 関
Template: astra
Version: 1.0.0
*/

/* --- 親テーマCSSを上書きするスタイルはここに --- */
@import url("../astra/style.css");

/* ============================
   全ページ共通：ページタイトル装飾
   （WordPress固定ページなどの h1.entry-title）
============================ */
h1.entry-title {
  font-size: 2.2rem;            /* 見出しサイズ */
  font-weight: 700;             /* 太字 */
  color: #222;                  /* 文字色 */
  margin: 2.5rem 0 1.5rem;      /* 上下余白 */
  padding-left: 1rem;           /* 左余白 */
  border-left: 4px solid #007bff; /* 左ライン（テーマカラー） */
  letter-spacing: 0.03em;       /* 字間を少し広げる */
}

/* スマホ最適化 */
@media (max-width: 768px) {
  h1.entry-title {
    font-size: 1.7rem;
    margin: 2rem 0 1rem;
    padding-left: 0.75rem;
    border-left-width: 3px;
  }
}

/* Atatter front カスタム調整 */
.atatter-front h2 {
  text-align: center;
  font-size: 1.3rem;
  color: #222;
  margin: 10px 0;
}

/* ============================
   強制的に「みんなの当選報告」を青く
============================ */
h2.gallery-title,
.atatter-hits-gallery h2.gallery-title,
.elementor .atatter-hits-gallery h2.gallery-title,
.elementor-widget-heading .elementor-heading-title.gallery-title {
  color: #0077cc !important;
  font-size: 1.3rem !important;       /* ← ここを上げた */
  font-weight: 700 !important;
  text-align: left;
  border-left: 4px solid #0077cc;
  padding-left: 10px;
  margin-bottom: 10px;
  margin-top: 20px;
  line-height: 1.3;
  letter-spacing: 0.5px;              /* 少しだけ字間を空けて読みやすく */
}

/* =====================================================
   Atatter Front Layout : Astra干渉除去＋中央固定＋左右縦中央固定
   ===================================================== */

/* Astra側のmax-width解除 */
.ast-container,
.site-content,
.content-area,
#primary,
#main {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Elementor内部のmax-width解除 */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 100vw !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* 背景レイヤー（土台） */
.background-layer {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  width: 100vw !important;
  height: auto !important;
  overflow: hidden !important;
  position: relative;
  z-index: 0;
}

/* 中央固定ブロック */
.dummy-center {
  flex: 0 0 544px !important;
  width: 544px !important;
  max-width: 544px !important;
  margin: 0 auto !important;
  position: static !important;
}

/* 左右固定ブロック（上下中央＋各サイド領域の水平中央に固定） */
.at-left,
.at-right {
  position: fixed !important;
  top: 50%;
  transform: translate(-50%, -50%);  /* 要素自体の中心を基準に */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* 画面幅から中央544pxを除いた左右領域の真ん中に置く */
.at-left  { left: calc((100vw - 544px) / 4); }
.at-right { left: calc(100vw - (100vw - 544px) / 4); }

/* 内部調整 */
.at-left > .e-con-inner,
.at-right > .e-con-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Elementor全体の余白リセット */
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget-wrap,
.e-con-inner {
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* はみ出し防止 */
html, body {
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
}

/* =====================================================
   Atatter Right Menu : 固定縦型ナビ（横書き安定版）
   ===================================================== */

.at-right {
  position: fixed !important;
  top: 50%;
  left: calc(100vw - (100vw - 544px) / 4);
  transform: translate(-50%, -50%);
  display: flex !important;
  flex-direction: column;      /* ← 縦並びで固定 */
  align-items: center;
  justify-content: center;
  gap: 1.3em;
  z-index: 300;
  text-align: center;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 1.45em;
}

/* タイトル（メニュー） */
.at-right h2 {
  font-weight: 900;
  font-size: 1.5em;
  margin: 0 0 0.8em 0;
  border-bottom: 3px dashed #0077CC;
  width: 100%;                  
  padding-bottom: 0.3em;
  color: #111;
  white-space: nowrap;         /* ← 横書き強制！ */
  display: inline-block;
  text-align: center;
}

/* 下の青破線（長め） */
.at-right::after {
  content: "";
  display: block;
  width: 100%;                 
  border-bottom: 3px dashed #0077CC;
  margin-top: 1em;
}

/* 各リンク */
.at-right a.nav-item {
  display: block;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 1.15em;
  line-height: 1.6;
  transition: all 0.25s ease;
}

/* ホバー時 */
.at-right a.nav-item:hover {
  color: #0077CC;
  transform: scale(1.05);
}

/* アクティブ */
.at-right a.nav-item.active {
  color: #0077CC;
  font-weight: 900;
}

/* モバイル非表示 */
@media (max-width: 768px) {
  .at-right,.at-left {
    display: none !important;
  }
}

/* ==========================
   Select2 ドロップダウン内の余白リセット（上下＋左）
   ========================== */
.entry-content ul.select2-results__options {
  padding-left: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ====== 公式未登録リボン（完成版） ====== */
.hit-no-url {
  position: absolute;
  top: 0;
  left: 0;
  width: 85px;
  height: 85px;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}

/* 赤帯部分 */
.hit-no-url::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-top: 52px solid #0077cc;
  border-right: 52px solid transparent;
}


/* 白文字 */
.hit-no-url::after {
  content: "No link";
  position: absolute;
  top: 10px;
  left: -41px;
  transform: rotate(-45deg);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-align: center;
  width: 120px;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

/* 注記テキスト（見出し下） */
.hits-note {
  color: #666;
  font-size: 13px;
  text-align: left;
  margin: 10px !important;
}

.login-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 1.2rem !important;
}

.atatter-login-wrapper form {
  width: 100%;
  margin: 0 auto;
}

.login-field {
  margin-bottom: 0.8rem;
}

.login-submit {
  margin-top: 1.8rem; /* ← ログインボタン上の余白 */
}

.login-note {
  text-align: left;
  font-size: 0.9rem;
  color: #333;
  margin-top: 1rem;
}

/* 会員登録・ログイン共通ボタン（スマホ全幅） */
.atatter-login-wrapper .button.button-primary {
  width: 100%;
  display: block;
  text-align: center;
  font-size: 1rem;
  padding: 0.8em 0;
  border-radius: 6px;
  background-color: #0077cc;
}

.register-success {
  color: #008800;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.2rem;
}
.register-error {
  color: #e60023;
  text-align: left;
  margin-bottom: 0.8rem;
}

#favorite-btn:hover i {
  transform: scale(1.15);
  transition: transform 0.2s ease;
}

/* 見出し＋ハート全体 */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px; /* ← 左右に余白を戻す */
  margin-top: 10px !important
}

/* ハート */
#favorite-btn {
  cursor: pointer;
  font-size: 24px;
}
#favorite-btn i {
  transition: color 0.15s ease, transform 0.2s ease;
}
#favorite-btn:hover i {
  transform: scale(1.15);
}
#favorite-btn:active i {
  transform: scale(0.85);
}

/* ===============================
   Select2 表示調整（全文表示・折り返し対応）
=============================== */

/* 枠本体（高さや余白も統一） */
.select2-container--default .select2-selection--single {
  width: 100% !important;
  min-height: 42px !important;
  display: flex;
  align-items: center;
  border: 1px solid #ccc !important;
  border-radius: 6px;
  box-sizing: border-box;
  overflow: visible !important; /* ← 折り返しを確実に見せる */
}

/* テキスト部分（折り返し・余白・色） */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  display: block !important;
  width: 100% !important;
  white-space: normal !important;     /* ← 折り返し許可 */
  word-break: break-word !important;  /* ← 長い単語も折る */
  line-height: 1.4 !important;
  padding: 8px 10px !important;
  color: #333 !important;
  overflow: visible !important;
  text-overflow: unset !important;    /* ← 省略を明示的に解除 */
}

/* 矢印の位置調整 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: 10px !important;
}

/* コンテナ幅を100%に固定（Select2特有のズレ対策） */
#front-hit-item.select2-hidden-accessible + .select2-container,
#front-hit-content.select2-hidden-accessible + .select2-container {
  width: 100% !important;
  max-width: 100% !important;
}

/* flexの親要素内ではみ出さないように */
.atatter-form .field { min-width: 0; }


/* ===============================
   Select2：クリアボタン位置補正
=============================== */
/* テキストとクリアボタンが重ならないよう右に余白を確保 */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-right: 36px !important; /* ← ここを追加（28〜40pxで調整可） */
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  position: absolute !important;
  right: 28px !important;  /* ▼矢印の左に配置 */
  top: 50% !important;
  transform: translateY(-50%);
  font-size: 18px;
  color: #666;
  cursor: pointer;
  background: #fff;   /* ← 追加：背景で文字と重ならないように */
  z-index: 5 !important; /* ← 追加：テキストより上に出す */
}

/* ✅ Select2 multiple の × ボタン（見た目そのまま当たり判定だけ拡大） */
.select2-selection__choice {
    position: relative;
    padding-right: 22px !important; /* × のために少し右余白を調整 */
}

/* 見た目の × は通常サイズのまま */
.select2-selection__choice__remove {
    position: absolute;
    right: 4px;   /* 元の位置 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 2;
}

/* ✅ 透明の大きい当たり判定を追加 */
.select2-selection__choice__remove::before {
    content: "";
    position: absolute;
    top: -8px;      /* 上に拡張 */
    bottom: -8px;   /* 下に拡張 */
    left: -8px;     /* 左に拡張 */
    right: -8px;    /* 右に拡張 */
    cursor: pointer;
}


/* ===============================
   iPhone SEなど狭幅画面用の調整
=============================== */
@media (max-width: 400px) {
  /* テキストとボタンの距離を少し広げる */
  .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 44px !important; /* ← 少し広げて安全マージン */
  }

  /* クリアボタン（×）を少し左へ */
  .select2-container--default .select2-selection--single .select2-selection__clear {
    right: 34px !important;  /* ← 通常より約6px左寄せ */
    font-size: 16px !important; /* ← 若干小さめに */
  }

  /* ドロップダウン矢印の位置も微調整 */
  .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 8px !important;
  }
}


/* ▼矢印と競合しないように調整 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  right: 8px !important;
}

/* ===============================
   当選投稿ページ：ボタンスタイル調整
=============================== */

/* ===============================
   ボタンの非活性時スタイルを最優先で上書き
=============================== */
#front-hit-form button:disabled,
#front-hit-form button[disabled],
#front-hit-form input[type="submit"]:disabled,
#front-hit-form input[type="button"]:disabled {
  background-color: #ccc !important;   /* ← 最優先でグレー化 */
  color: #666 !important;              /* 文字も薄めに */
  border-color: #bbb !important;       /* 枠もやわらかく */
  cursor: not-allowed !important;
  opacity: 1 !important;               /* Safari半透明対策 */
  box-shadow: none !important;         /* Astraボタンの影を無効化 */
  transition: none !important;         /* カラー変化を防止 */
}

#front-hit-image-btn:hover {
  background-color: #e9e9e9 !important;
}

/* ③ 「当選を投稿する」ボタン → 全幅＆高さ40px */
#front-hit-submit {
  display: block;
  width: 100% !important;
  height: 40px !important;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  background-color: #0077cc !important;
  color: #fff !important;
  border: none;
  transition: 0.2s;
}

#front-hit-submit:hover {
  background-color: #0061a8 !important;
}

/* プレビュータイトル */
#front-hit-image-preview-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

#front-hit-item.select2-hidden-accessible + .select2-container {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}


/* ============ 共通モーダル ============ */
.atatter-dialog {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
}

/* 背景（オーバーレイ） */
.dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 20000;
  pointer-events: auto;
}

/* 本体（ボタンなど含む） */
.dialog-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  padding: 1.6em;
  width: 85%;
  max-width: 380px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 20002; /* ← overlayより上 */
  pointer-events: auto;
}

.dialog-content p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 1.2em;
}

.dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.dialog-buttons button {
  cursor: pointer;
  pointer-events: auto;
}

/* 説明文など */
.dialog-subtext {
  font-size: 0.85rem;
  color: #666;
  margin-top: -0.5em;
  margin-bottom: 1em;
  line-height: 1.4;
}

/* ===== ローディング ===== */
#favorite-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  z-index: 10000;
}

/* ====== 確認モーダル専用の文面整形 ====== */
#favorite-change-dialog p {
  margin-bottom: 1em;
  line-height: 1.6;
  color: #333;
}

/* ===== モーダルクリック修正版（最優先） ===== */
#favorite-change-dialog {
  z-index: 20001 !important; /* ← 全体を最前面に */
}

#favorite-change-dialog .dialog-overlay {
  z-index: 20001 !important; /* ← 背景 */
}

#favorite-change-dialog .dialog-content {
  text-align: left; /* 中央寄せ解除 */
  z-index: 20002 !important; /* ← ボタン含む本体。overlayより前面 */
  position: relative;
  pointer-events: auto; /* ← 押せるように */
}

#favorite-change-dialog .dialog-subtext {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5em;
  margin-bottom: 1.4em;
}

/* =============================
   お気に入り登録トースト
============================= */
.favorite-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.8em 1.4em;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 99999;
  display: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  pointer-events: none !important; /* ← マウス・タップイベントを透過 */
}
.favorite-toast.loading {
  background: #0077cc;
}
.favorite-toast.success {
  background: #28a745;
}
.favorite-toast.error {
  background: #e60023;
}

/* 折りたたみボタン */
.guideline-toggle {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #f5fcff;
  color: #0077cc;
  border: 1px solid #cde;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

/* 折りたたみ中身 */
.guideline-content {
  display: none; /* ← 初期は非表示 */
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  padding: 12px;
  margin-top: -6px;
  border-radius: 0 0 6px 6px;
  color: #444;
  font-size: 14px;
  line-height: 1.6;
}
.guideline-content ul {
  margin: 0;
  padding-left: 1.4em;
}
.guideline-content li {
  margin-bottom: 0.6em;
}

.guideline-toggle::after {
  content: '+';
  float: right;
}
.guideline-toggle.is-open::after {
  content: '−';
}

/* ==================================================
   🎯 アケログ専用ボタン統一（Primary / Secondary）
   ================================================== */

/* プライマリーボタン（青地白文字） */
.atatter-front .button-primary,
.atatter-dialog .button-primary {
  background-color: #0077cc !important;
  color: #fff !important;
  border: 2px solid #0077cc !important;
  border-radius: 6px;
  padding: 0.6em 1.4em;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.atatter-front .button-primary:hover,
.atatter-dialog .button-primary:hover {
  background-color: #025bb5 !important;
  border-color: #025bb5 !important;
}

/* セカンダリーボタン（白地青枠、hoverで反転） */
.atatter-front .button-secondary,
.atatter-dialog .button-secondary {
  background-color: #ffffff !important;
  color: #0077cc !important;
  border: 2px solid #0077cc !important;
  border-radius: 6px;
  padding: 0.6em 1.4em;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.atatter-front .button-secondary:hover,
.atatter-dialog .button-secondary:hover {
  background-color: #0077cc !important;
  color: #fff !important;
}

/* === Select2 複数選択プレースホルダー幅修正 === */
.select2-container--default .select2-selection--multiple .select2-search--inline {
  width: 100% !important; /* ← ← ← これが最重要！！ */
  min-width: 120px;       /* ← 幅0防止。調整可 */
  flex: 1 1 auto;         /* ← タグがあっても自然に広がる */
}

.select2-container--default .select2-selection--multiple .select2-search__field {
  width: 100% !important; /* ← inputも幅を持たせる */
  min-width: 80px;
}

/* ===== 説明文（.description） ===== */
#new-item-form .description,
#new-content-form .description,
#new-character-form .description {
  display: block;
  font-size: 0.85em;   /* ← 一回り小さく（14px→約12px想定） */
  line-height: 1.4;
  color: #666;         /* ほんの少し薄めに */
  margin-top: 2px 0;
}

#add-content-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =============================
   ネイティブ select のドロップダウン矢印を非表示
   ============================= */
#front-hit-content:not(.select2-hidden-accessible) {
  appearance: none;             /* 標準ブラウザ用 */
  -webkit-appearance: none;     /* Safari / Chrome */
  -moz-appearance: none;        /* Firefox */
  background-image: none !important; /* 矢印アイコン除去 */
}

/* IE用のフォールバック（いまはほぼ不要） */
#front-hit-content::-ms-expand {
  display: none;
}

.atatter-mypage .mp-empty { padding: 12px; background:#f5fcff; border:1px solid #cfe8ff; }
.atatter-mypage .mp-char-name { font-size:1.25rem; font-weight:700; }
.atatter-mypage .mp-ratio { color:#333; }
.atatter-mypage .mp-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:2px; margin-top:10px; }
.atatter-mypage .mp-card img { width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:0; }
.atatter-mypage .mp-label { display:block; font-weight:600; margin-bottom:6px; }
.atatter-mypage .mp-help { display:block; color:#666; font-size:12px; margin:6px 0 8px; }
.atatter-mypage input[type="text"] { width:100%; padding:8px; border:1px solid #ccc; border-radius:4px; }

/* ======================
   マイページ：あなたの推し 見出し
====================== */
.atatter-mypage h2.gallery-title {
  margin-left: 10px;
  margin-right: 10px;
}

/* ======================
   推しキャラカード全体
====================== */
.mp-fav-card {
  background-color: #fff8fa; /* 全体の淡いピンク背景 */
  border-radius: 0; /* 全幅デザインのため角丸削除 */
  padding: 0; /* 余白削除 */
  margin: 0;
  box-shadow: none; /* フラット化 */
}

/* 💖 キャラ名バー（全幅） */
.mp-fav-charname {
  width: 100%;
  display: block;
  background: linear-gradient(135deg, #ff9dbb, #ffb7ca);
  color: #fff;
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  padding: 8px 0;
  margin: 0; /* 上余白なし */
  box-shadow: 0 4px 8px rgba(255, 100, 150, 0.25);
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

/* 💕 関連IPタグ群 */
.mp-related-ips {
  display: flex;
  flex-wrap: nowrap;        /* 折り返さず */
  gap: 6px;
  overflow-x: auto;         /* 横スクロール許可 */
  scrollbar-width: thin;    /* Firefox */
  scrollbar-color: #ffc2d1 transparent;
  -webkit-overflow-scrolling: touch; /* スマホでスムーズスクロール */
}

/* スクロールバー（Chrome/Safari） */
.mp-related-ips::-webkit-scrollbar {
  height: 6px;
}
.mp-related-ips::-webkit-scrollbar-thumb {
  background-color: #ffc2d1;
  border-radius: 3px;
}

/* タグ本体 */
.mp-related-ips .mp-tag {
  flex: 0 0 auto; /* 折り返さず固定幅 */
  background-color: #ffe8ee;
  border: 1px solid #ffc6d3;
  border-radius: 20px;
  color: #444;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.mp-related-ips .mp-tag:hover {
  background-color: #ffd8e3;
  transform: translateY(-1px);
}

/* 🎯 当選情報（フル幅対応） */
.mp-hero {
  display: flex;
  align-items: center;
  background-color: #fff8fa;
  padding: 0 10px 0 10px;
}

.mp-avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
}

.mp-hero-text {
  flex: 1;
}

/* 💕 関連IP全体ラッパー */
.mp-related-ips-wrap {
  background-color: #fff8fa;
  padding: 8px 0 0 10px;
  margin: 0;
}

/* 見出し */
.mp-related-caption {
  font-size: 14px;
  font-weight: 600;
  color: #ff5c8a;
  margin-bottom: 6px;
  text-align: left;
}

/* 💕 関連IP 見出し行＋編集リンク */
.mp-related-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  box-sizing: border-box;
}

.mp-edit-link {
  display: inline-block;
  margin-left: auto; /* ← 右端に寄せる */
  font-size: 14px;
  color: #ff5c8a;
  text-decoration: none !important; /* ← 下線確実に消す */
  font-weight: 600;
  transition: opacity 0.2s ease;
  padding-right: 10px; /* ← 右端に10px余白を追加 */
}

.mp-edit-link:hover {
  opacity: 0.7;
}

.mp-sep {
  margin-top: 10px !important; 
  border: none;
  border-top: 1px solid #ffd6e0;
}

/* 🔢 数字部分を強調 */
.mp-ratio-num {
  font-size: 40px;
  font-weight: 700;
  color: #ff5c8a; /* ピンク系で視線誘導 */
  letter-spacing: 0.02em;
}

/* （分数）部分は通常文字サイズに */
.mp-ratio-detail {
  font-size: 20px;
  font-weight: 700;
  color: #ff5c8a;
}

/* ======================
   タブ切り替え（当選済／未所持）
====================== */
.mp-grid-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 12px;      /* 上にゆとり */
  margin-bottom: 14px;   /* 下も少し空ける */
  border-bottom: 2px solid #ff5c8a;
  padding: 0 8px;        /* 左右に小さな余白を */
}

.mp-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: #fafafa;
  border: 1px solid #ffd6e0;
  border-bottom: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 0;  /* ✅ 下の角丸削除 */
  border-bottom-right-radius: 0; /* ✅ 下の角丸削除 */
  margin: 0 4px; /* タブ同士の間隔を確保 */
}

/* 🌸 アクティブ時 */
.mp-tab.active {
  background: linear-gradient(135deg, #ff5c8a, #ffb7ca);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 -2px 4px rgba(255, 155, 175, 0.25) inset;
  border-color: #ff5c8a;
  position: relative;
  z-index: 2;
}

/* 🎨 タブ全体下の薄い影で浮かせる感じ */
.mp-grid-tabs::after {
  content: "";
  display: block;
  height: 2px;
  background: #ffd6e0;
  position: relative;
  top: -1px;
}

/* マイページの挨拶スタイル（atatter-front h2 と同等） */
.mp-greeting {
  font-size: 1.3rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 30px !important;
  margin-top: 15px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  text-align: center;
}

.mp-member-link {
  color: #0077cc;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}
.mp-member-link:hover { text-decoration: underline; }

/* 🔹 ログアウトリンク */
.mp-logout-link {
  font-size: 14px;
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
}

.mp-logout-link:hover {
  text-decoration: underline;
}

#mp-load-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  color: #ff7b9c;
  background: transparent;
  border: none;
  border-top: 1px solid #ffd1df;
  border-bottom: 1px solid #ffd1df;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 0;
}

#mp-load-more:hover {
  color: #ff4e84;
  background: #fff4f7;
}

.mp-edit-block.danger {
  margin-top:18px;
  padding:0 10px 20px 10px;
}

.atatter-mypage .mp-edit-block.danger #mp-unfavorite {
  background: #fff;
  color: #ff7ea7;
  font-weight: 500;
  border: 1px solid #ffd3e0;
  border-radius: 8px;
  width: 100%;
  padding: 10px 0;
  text-align: center;
  transition: 0.2s;
}

.atatter-mypage .mp-edit-block.danger #mp-unfavorite:hover {
  background: #fff5f8;
  border-color: #ffb6ce;
}

.mp-grid.hidden {
  display: none !important;
}

.mp-note {
  text-align: center;
  font-size: 13px;
  color: #222;
  margin: 6px 0 4px;
}

.loading-note {
  color: #ff5c8a;
}

.empty-note {
  color: #222;
}

.my-hits-link {
  color: #0077cc;
  font-size: 14px;
}

.link-divider {
  color: #ccc;
  margin: 0 2px;
}



/* ===== 当選一覧ページでもマイページと同じ正方形グリッドにする ===== */
.my-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 10px;
}

.my-posts-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}

/* ====== /my-page/edit-character ====== */
.atatter-edit-character { max-width: 900px; margin: 10px auto 40px; }

.aec-row { margin-bottom:14px; }
.aec-label { display:block; font-weight:700; margin-bottom:6px; }
.aec-static { padding:10px 12px; background:#fafafa; border:1px solid #eee; border-radius:8px; }
.aec-input, .aec-select { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:8px; }
.aec-ip-alias-list { display:flex; flex-direction:column; gap:8px; }
.aec-ip-row { display:grid; grid-template-columns: 180px 1fr; gap:10px; align-items:center; }

.aec-ip-name {
	font-weight:600;
    font-size: 14px;
    color: #0077cc;
}

.aec-ip-alias-input { width:100%; padding:8px 10px; border:1px solid #ddd; border-radius:8px; }

.aec-actions { margin-top:18px; display:flex; gap:10px; }
.aec-back { background:#f6f7f7; }
.aec-muted { color:#999; font-size:13px; }

.aec-textarea {
    width: 100%;
    min-height: 24px;
    height: auto;
    resize: none;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.aec-help {
	font-size: 0.9rem;
    font-weight: 400;
    color: #666;
	line-height: 1.4;
}

/* ✅ IP名と入力欄を縦に強制する */
.aec-ip-row {
  display: block !important;
}

/* ✅ 子要素も強制縦並び */
.aec-ip-row > * {
  display: block !important;
  width: 100% !important;
  margin-bottom: 6px;
}

/* ✅ マイページへ戻るボタン（<a>版）を button-secondary と同じにする */
a.button.aec-back {
  background-color: #ffffff !important;
  color: #0077cc !important;
  border: 2px solid #0077cc !important;
  border-radius: 6px;
  padding: 0.6em 1.4em;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none;
  transition: all 0.2s ease;
  line-height: 1.4;
  display: inline-block; /* ← aタグをボタンっぽくする */
  text-decoration: none !important; /* 下線消し */
}

/* ✅ hover */
a.button.aec-back:hover {
  background-color: #f0f8ff !important; /* 好みなら変更可 */
}

/* ===== Atatter Edit Form ===== */
.aef-wrap{ max-width: 720px; margin: 0 auto; }
.aef-note{ color:#666; font-size: 14px; line-height:1.6; margin:10px 0 18px; }
.aef-form .aef-row{ margin-bottom:14px; }
.aef-label{ display:block; font-weight:600; margin-bottom:6px; }
.aef-required{ color:#ff0000; font-weight:700; font-size:14px; }

.aef-input, .aef-select, .aef-textarea{
  width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:8px;
  font-size:16px; background:#fff; box-shadow:none;
}
.aef-input:focus, .aef-select:focus, .aef-textarea:focus{
  outline:none; border-color:#0077cc; box-shadow:0 0 0 3px rgba(0,119,204,.15);
}

.aef-textarea{ resize: vertical; min-height: 120px; }

.aef-actions{ display:flex; gap:12px; margin-top:10px; }
.aef-submit{
	width: 100%;
    margin-bottom: 30px;
}

.aef-select {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: normal !important;
}

/* プレビュー枠を正方形に */
#front-hit-image-preview {
  width: 100%;
  max-width: 320px; /* PCでの上限。スマホは100% */
  aspect-ratio: 1 / 1; /* ✅ 常に正方形 */
  position: relative;
  overflow: hidden;
  background: #f3f3f3;
  margin: 0;
}

/* 中の img を綺麗に収める */
#front-hit-image-preview img,
#front-hit-image-preview-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover; /* ✅ トリミングして自然に見せる */
  top: 0;
  left: 0;
}

body .hit-image-label#front-hit-image-btn {
  all: unset;
  display: inline-block;
  padding: 6px 14px;
  border: 2px solid #0077cc;
  border-radius: 4px;
  background: #fff;
  color: #0077cc;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* 通常状態 */
label#front-hit-image-btn.hit-image-label {
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
}

/* 非活性状態 */
label#front-hit-image-btn.hit-image-label.disabled {
  opacity: 0.5;
  pointer-events: none !important;
}

/* ================================
   当選投稿ページ 幅制限解除
   ================================ */
.elementor-element-33429f56 {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

/* ======================
   Elementor 新コンテナ幅制御解除
====================== */
.elementor-element-1d94c2b8 {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

/* ======================
   Elementor 新コンテナ幅制御解除（会員登録ページ）
====================== */
.elementor-element-4c337bb2 {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

/* ======================
   Elementor 新コンテナ幅制御解除（マイページ）
====================== */
.elementor-element-6006c462 {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

.elementor-element-55f07a1d{
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

.elementor-element-f5e8346 {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

.elementor-element-534563ac {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

.elementor-element-3d28b7f1 {
    --container-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}
/* ====================== */

.hit-post-title{
	display: block;
	font-size: 1.3rem;
	font-weight: 600;
	text-align: center !important;
	color: #222;
}

.atatter-global-header {
    position: relative;
    background: #fff;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #d1d5db;
}

.atatter-header-account {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.atatter-account-button {
	background: none;
	border: none;
	font-size: 1.6rem;  /* フッターと同サイズ */
	color: #6b7280;
	cursor: pointer;
	padding: 4px 6px;
	line-height: 1;
}

.atatter-account-button i.fa-user {
  font-size: 1.8rem;
}

.atatter-account-button i.fa-caret-down {
  font-size: 0.8rem;
  transform: translateY(-5px); /* ← 上に3px */
}

.atatter-account-button i.fa-caret-up {
  font-size: 0.8rem;
  transform: translateY(-5px); /* ← 上に3px */
}

.atatter-account-dropdown {
	display: none;
	position: absolute;
	right: -40px;           /* ← ★ここで左側に広げる */
	width: 180px;           /* ← ★メニュー幅 */
	margin-top: 8px;
	background: #fff;
	border: 1px solid #ddd;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	border-radius: 6px;
	overflow: hidden;
	z-index: 9999 !important;
}

.atatter-account-dropdown a {
	display: flex;
	align-items: center;
	gap: 8px;               /* ← アイコンと文字の間隔 */
	padding: 10px;
	line-height: 1.2 !important;
	color: #333;
	text-decoration: none;
	font-size: 14px;
}

.atatter-account-dropdown a:hover {
    background: #f3f3f3;
}

/* 開閉用（JSで制御） */
.atatter-header-account.open .atatter-account-dropdown {
    display: block !important;
}

.atatter-login-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  gap: 4px;
  text-decoration: none;
  color: #6b7280;
}

.atatter-login-link i {
  font-size: 1.6rem;  /* ← ここで調整 */
  line-height: 1;
}

/* テキスト（小さめだが視認性を残す） */
.atatter-login-link span {
  font-size: 0.55rem;
  line-height: 1;
  color: #6b7280;
  font-weight: 600;
}

/* ✅ 検索フォームの親コンテナを “後ろ” に下げる */
.elementor-element-5b6af9ed {
    position: relative !important;
    z-index: 1 !important;
}

/* ✅ Select2 の固定レイヤー（ドロップダウン部分）は前に */
.select2-container--open {
    z-index: 2000 !important;
}

.atatter-header-account.open .atatter-account-button i.fa-user,
.atatter-header-account.open .atatter-account-button i.fa-caret-up{
  color: #0077cc !important;
}

.atatter-account-button i {
  color: #6b7280 !important;
}

.atatter-account-button {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.atatter-account-button:focus,
.atatter-account-button:hover {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* PC表示のとき、ドロップダウンを左に寄せる */
@media (min-width: 1025px) {
  .atatter-header-account .atatter-account-dropdown {
    right: -40px !important;  /* ← 左へ40px移動（微調整可） */
    top: 40px;                 /* ボタン下に揃える */
  }
}

/* 更新するボタンを全幅にする */
.atatter-profile-edit .atatter-btn-primary {
    width: 100% !important;
    height: 40px !important;        /* ← 希望どおり縦40px */
    display: block;
}

/* ユーザー名（変更不可）はより“触れない”感を出す */
.atatter-profile-edit input[disabled] {
    background: #e5e5e5 !important;
    color: #666 !important;
    cursor: not-allowed !important;
}

/* =====================================================
   モーダル関係
   ===================================================== */
/* ===== IP編集　差分確認モーダル===== */
.at-modal-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9998;
}
.at-modal{
	position:fixed;
	inset:auto 16px 16px 16px;
	top:10%;
	max-width:680px;
	max-height: 90vh; /* ←ここに付ける！！ */
	margin:0 auto;
	background:#fff;
	border-radius:12px;
	box-shadow:0 10px 30px rgba(0,0,0,.25);
	z-index:9999;
	overflow:hidden;
	display:flex;
	flex-direction:column;
}
.at-modal-header{ padding:14px 16px; font-weight:700; border-bottom:1px solid #eee;}

.at-modal-body{
	overflow:auto;
	padding:10px 10px 0 10px;
	flex-grow: 1;       /* ←必要な時だけ縦に伸びる */
	flex-shrink: 1;
}

.at-diff-pre {
  padding: 15px;
  background: #f5fcff;
  border: 1px solid #ccc;
}

.at-diff-block {
    margin-bottom: 20px;   /* お好きな数値に調整可能 */
}

.at-badge{
	font-size:16px;
	font-weight: 600;
	padding:2px 6px;
	-webkit-text-fill-color: #0077cc !important;
    text-align: center;
}

/* 枠の中のバッジだけ中央寄せ */
.at-diff-pre .at-badge {
  display: table;          /* 内容幅のブロックにする */
  margin: 0 auto 6px;     /* 左右autoで中央寄せ & 下余白 */
}

.at-modal-footer{
	padding:12px 16px;
	display:flex;
	gap:10px;
	justify-content:flex-start;
	border-top:1px solid #eee;
}

.at-btn {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #0077cc;
  background: #fff;
  color: #0077cc;
  transition: 0.2s;
  min-width: 110px;
  text-align: center;
}

/* ✅ primary（青ボタン） */
.at-btn-primary {
  background: #007cc !important;
  color: #fff;
}

.at-btn:disabled{ opacity:.6; cursor:not-allowed; }

#at-diff-modal-backdrop .at-modal {
    margin: auto;
    width: 92%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;

    /* ✅ ★ 上方向に少し余白をつけて下げる */
    margin-top: 15px !important;
}

/* 青い主ボタン（OK） */
#at-diff-modal-backdrop .at-modal-footer .at-btn.at-btn-primary,
#at-diff-modal-backdrop .at-modal-footer a.at-btn.at-btn-primary,
#at-diff-modal-backdrop .at-modal-footer button.at-btn.at-btn-primary {
  background-color: #0077cc !important;    /* ← shorthand ではなく background-color で上書き */
  border-color: #0077cc !important;
  color: #fff !important;
}

/* =======================================================
   ✅ モーダルを全レイヤーの最前面に強制配置
   （Elementor の stacking context を完全無視）
   ======================================================= */
#at-diff-modal-backdrop,
#at-diff-modal-backdrop .at-modal {
    position: fixed !important;
    z-index: 999999 !important;
    inset: 0 !important; /* top:0; right:0; bottom:0; left:0 と同じ */
}

/* backdrop（黒背景） */
#at-diff-modal-backdrop {
    background: rgba(0,0,0,0.5) !important;
    display: none;
}

/* モーダル本体だけ中央寄せ */
#at-diff-modal-backdrop .at-modal {
    margin: auto;
    width: 92%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

/* =======================================================
   ✅ Select2 をモーダルより後ろに押し下げる
   ======================================================= */
.select2-container {
    z-index: 10 !important;
}

.select2-dropdown {
    z-index: 20 !important;
}

/* ===== モーダル全体 （削除確認候補）===== */
.member-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.member-modal.hidden { display: none; }

.member-modal-inner {
  background: #fff;
  width: 90%;
  max-width: 360px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.member-modal-inner h3 {
  margin-bottom: 16px;
  text-align: center;
  color: #333;
  font-size: 18px;
  font-weight: 700;
}

.member-modal-inner label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
}

.member-modal-inner input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 4px;
}

#save-member-info {
  width: 100%;
  margin-top: 18px;
  background: #0077cc;
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
}

#close-member-modal {
  width: 100%;
  margin-top: 8px;
  background: #eee;
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
}

/* ▼ お気に入り必須モーダル（グローバル）専用 ▼ */
.fav-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.fav-modal {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 85%;
  max-width: 420px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.fav-modal-header {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 12px;
}

.fav-modal-body {
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.fav-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.fav-btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #0077cc;
  color: #0077cc;
  background: #fff;
}

.fav-btn-primary {
  background: #0077cc;
  color: white;
}

.fav-btn:hover {
  opacity: 0.8;
}

/* ===== ヒット画像モーダル ===== */
.hit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.hit-modal-overlay.is-open {
  display: flex;
}

.hit-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 560px;
  width: 90%;
  padding: 16px 16px 20px;
}

/* 右上の × ボタン */
.hit-modal-close {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0 !important;      /* ← ここが一番大事 */
  margin: 0 !important;  
  border: none;
  background: transparent;
  cursor: pointer;
}

/* ここで × を描画して、ちょい上に持ち上げる */
.hit-modal .hit-modal-close::before {
  content: "×";
  display: block;
  font-size: 24px;
  line-height: 1;
  color: #666;
  position: relative;
  top: -6px;
}

#hit-modal-image {
  max-width: 512px;
  max-height: 512px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 画像まわり：左右のpaddingはナシ（画像を小さくしない） */
.hit-modal-image-area {
  position: relative;
  text-align: center;
  margin-top: 16px;
  padding: 0;   /* ← 左右 0 にする */
}

/* 共通ナビボタン（＜ ＞） */
.hit-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;

  /* Astra の button スタイルを打ち消す */
  padding: 0 !important;
  border: none !important;
  background: transparent !important;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 50px;   /* ← 矢印自体を大きく */
  line-height: 1;
  color: #666;
  cursor: pointer;
  
  z-index: 10;
}

.hit-modal-prev { left: -29px; }
.hit-modal-next { right: -29px; }

.hit-modal-body {
  margin-top: 12px;
  text-align: center;
}

.hit-modal-item-name {
  font-weight: 600;
  margin-bottom: 8px !important;
  text-align: left;   /* 左寄せ指定 */
}

/* 「公式商品ページを見る」リンクの下線を消す */
.hit-modal-item-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid #0077cc;
  font-size: 13px;
  text-decoration: none !important;   /* ← 下線削除 */
  color: #0077cc;
}

.hit-modal-item-link:hover {
  text-decoration: none;
  background: #0077cc;
  color: #fff;
}

body.hit-modal-open {
  overflow: hidden;
}

/* グリッド全体（幅544pxまで） */
.atatter-hits-gallery .hits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ← mp-grid と同じ */
  gap: 2px;
  max-width: 544px;
  margin: 10px auto 0;
}

/* 3列タイル（gap分を引いてだいたい180px） */
.atatter-hits-gallery .hit-card {
  width: 100%;
}

/* ボタンを“透明なラッパ”にする */
.atatter-hits-gallery .hit-card-open {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: inherit;
}

/* サムネイル：正方形＆最大180px */
.atatter-hits-gallery .hit-card-thumb {
  width: 100%;
  max-width: 180px;
  max-height: 180px;
  aspect-ratio: 1 / 1;     /* 正方形維持（対応ブラウザ用） */
  object-fit: cover;       /* 余白なしでトリミング */
  display: block;
  margin: 0 auto;
}

/* フォーカス枠が気になるなら */
.atatter-hits-gallery .hit-card-open:focus {
  outline: none;
}

/* ＜＞＆× の枠／背景を全状態で完全オフ */
.hit-modal-close,
.hit-modal-close:hover,
.hit-modal-close:focus,
.hit-modal-close:active,
.hit-modal-close:focus-visible,
.hit-modal-nav,
.hit-modal-nav:hover,
.hit-modal-nav:focus,
.hit-modal-nav:active,
.hit-modal-nav:focus-visible {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #666 !important;  /* 必要なら色も固定 */
}

/* =============================
   マイページ未当選：タイルの青背景を消す
   ============================= */
.atatter-mypage .mp-grid .hit-card {
  background: transparent !important;
  padding: 0 !important;
}

/* 念のため中身の a / button もリセット */
.atatter-mypage .mp-grid .hit-card a,
.atatter-mypage .mp-grid .hit-card-open,
.atatter-mypage .mp-grid .hit-image-no-link {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#new_content_characters + .select2-container .select2-dropdown {
  top: 100% !important;
  bottom: auto !important;
  margin-top: 4px !important;
}

/* =========================================
   スマホ時：関連キャラ Select2 のズーム防止
   （フォントを16px以上にする）
   ========================================= */
@media (max-width: 768px) {
  /* 入力欄の中身（選択チップ＋プレースホルダ） */
  #new-content-form .select2-container--default .select2-selection--multiple {
    font-size: 16px !important;
    line-height: 1.4;
  }

  #new-content-form .select2-container--default
  .select2-selection--multiple .select2-selection__choice {
    font-size: 16px !important;
  }

  /* 上の行に表示されるインライン検索欄 */
  #new-content-form .select2-container--default
  .select2-search--inline .select2-search__field {
    font-size: 16px !important;
  }

  /* ドロップダウン内の候補リストの文字も16pxに */
  #new-content-form .select2-results__option {
    font-size: 16px !important;
  }

  /* 元の select 自体も念のため16pxに */
  #aec-ip-select {
    font-size: 16px !important;
  }

  /* 表示部分（タグ・プレースホルダなど） */
  #aec-ip-select + .select2-container .select2-selection__rendered,
  #aec-ip-select + .select2-container .select2-selection__choice,
  #aec-ip-select + .select2-container .select2-selection__placeholder {
    font-size: 16px !important;
  }

  /* セレクト2の検索入力欄（ここが一番怪しい） */
  #aec-ip-select + .select2-container .select2-search__field {
    font-size: 16px !important;
  } 
}

/* Select2 候補リストの行間を詰める */
.select2-container--default .select2-results__option {
  padding: 3px 8px;      /* 上下の余白を小さく */
  line-height: 1.4;      /* 行間 */
  min-height: 0;         /* 余計な高さを消す保険 */
}