/* ============================================================
   tr-member.css  –  Toresugu Member Plugin
   ============================================================ */

/* ─────────────────────────────────────────
   CSS 変数
───────────────────────────────────────── */
:root {
  --trm-primary:    #2563eb;
  --trm-primary-h:  #1d4ed8;
  --trm-success:    #16a34a;
  --trm-danger:     #dc2626;
  --trm-bg:         #f8fafc;
  --trm-border:     #e2e8f0;
  --trm-text:       #1e293b;
  --trm-text-mute:  #64748b;
  --trm-radius:     10px;
  --trm-shadow:     0 2px 12px rgba(0,0,0,.08);
}

/* ─────────────────────────────────────────
   ナビゲーション：ログイン・会員登録ボタン
───────────────────────────────────────── */
/* nav auth wrapper span inside the <li> */
li.trm-nav-auth-item {
  padding: 0 !important;
}
li.trm-nav-auth-item > a {
  display: none !important; /* Astra adds a ghost <a> – hide it */
}
.trm-nav-auth {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  white-space: nowrap;
}
.trm-nav-login {
  display: inline-block;
  padding: 6px 16px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}
.trm-nav-login:hover {
  background: rgba(255,255,255,.15);
}
.trm-nav-register {
  display: inline-block;
  padding: 6px 16px;
  background: #f59e0b;
  color: #fff !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.trm-nav-register:hover { background: #d97706; }
.trm-nav-mypage {
  display: inline-block;
  padding: 6px 16px;
  background: var(--trm-primary);
  color: #fff !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.trm-nav-mypage:hover { background: var(--trm-primary-h); }
.trm-nav-logout {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  opacity: .8;
  transition: opacity .15s;
}
.trm-nav-logout:hover { opacity: 1; }

/* モバイル時はナビボタンを縦並びに */
@media (max-width: 768px) {
  .trm-nav-auth {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    margin-left: 0;
  }
}

/* ─────────────────────────────────────────
   ログインモーダル
───────────────────────────────────────── */
.trm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.trm-modal-box {
  background: #fff;
  border-radius: var(--trm-radius);
  padding: 32px 28px 28px;
  max-width: 380px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  text-align: center;
}
.trm-modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--trm-text-mute);
  line-height: 1;
}
.trm-modal-message {
  font-size: 15px;
  margin: 0 0 20px;
  color: var(--trm-text);
  font-weight: 600;
}
.trm-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─────────────────────────────────────────
   共通ボタン
───────────────────────────────────────── */
.trm-btn-login,
.trm-btn-register {
  display: block;
  padding: 11px 20px;
  border-radius: var(--trm-radius);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.trm-btn-login {
  background: var(--trm-primary);
  color: #fff;
}
.trm-btn-login:hover { background: var(--trm-primary-h); color: #fff; }
.trm-btn-register {
  background: #fff;
  color: var(--trm-primary);
  border: 2px solid var(--trm-primary);
}
.trm-btn-register:hover { background: #eff6ff; }

/* ─────────────────────────────────────────
   お気に入りボタン
───────────────────────────────────────── */
.trm-fav-btn,
.trm-fav-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: #fff;
  border: 2px solid var(--trm-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--trm-text-mute);
  transition: all .15s;
  white-space: nowrap;
}
.trm-fav-btn:hover,
.trm-fav-btn.active,
.trm-fav-remove-btn {
  border-color: #f43f5e;
  color: #f43f5e;
  background: #fff1f2;
}
.trm-fav-btn:disabled { opacity: .5; cursor: wait; }

/* ─────────────────────────────────────────
   通知ボタン
───────────────────────────────────────── */
.trm-notify-btn,
.trm-notify-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: #fff;
  border: 2px solid var(--trm-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--trm-text-mute);
  transition: all .15s;
}
.trm-notify-btn.active,
.trm-notify-btn:hover {
  border-color: #f59e0b;
  color: #d97706;
  background: #fffbeb;
}
.trm-notify-btn:disabled { opacity: .5; cursor: wait; }

/* ─────────────────────────────────────────
   お気に入りグリッド（マイページ）
───────────────────────────────────────── */
.trm-fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.trm-fav-card {
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  overflow: hidden;
  box-shadow: var(--trm-shadow);
  display: flex;
  flex-direction: column;
}
.trm-fav-card a {
  text-decoration: none;
  color: var(--trm-text);
  flex: 1;
}
.trm-fav-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.trm-fav-card-body { padding: 10px; }
.trm-fav-title { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.trm-fav-price { font-size: 14px; font-weight: 700; color: var(--trm-primary); margin: 0; }
.trm-fav-card .trm-fav-remove-btn {
  display: block;
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--trm-border);
  border-left: none; border-right: none; border-bottom: none;
  padding: 8px;
  font-size: 12px;
}

/* ─────────────────────────────────────────
   通知設定リスト（マイページ）
───────────────────────────────────────── */
.trm-notify-list { margin-top: 16px; }
.trm-notify-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.trm-notify-label { font-weight: 600; font-size: 14px; }
.trm-notify-item-name { font-size: 13px; color: var(--trm-text-mute); }
.trm-notify-status.on  { color: var(--trm-success); font-weight: 700; }
.trm-notify-status.off { color: var(--trm-text-mute); }
.trm-notify-toggle-btn {
  margin-left: auto;
  padding: 6px 14px;
  font-size: 12px;
}

/* ─────────────────────────────────────────
   配布キャンペーンページ
───────────────────────────────────────── */
.trm-campaign-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.trm-campaign-thumb img {
  width: 100%;
  border-radius: var(--trm-radius);
  display: block;
  margin-bottom: 20px;
}
.trm-campaign-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px;
}
.trm-campaign-desc { margin-bottom: 20px; line-height: 1.7; }
.trm-campaign-period,
.trm-campaign-conditions {
  background: var(--trm-bg);
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
}

/* 応募ブロック */
.trm-entry-block { margin: 24px 0; }
.trm-btn-enter {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--trm-primary);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  border: none;
  border-radius: var(--trm-radius);
  cursor: pointer;
  text-align: center;
  transition: background .15s;
  letter-spacing: .03em;
}
.trm-btn-enter:hover { background: var(--trm-primary-h); }
.trm-btn-enter:disabled { opacity: .6; cursor: wait; }

/* 応募済みバッジ */
.trm-badge-entered {
  font-size: 16px;
  font-weight: 700;
  color: var(--trm-success);
  margin: 0 0 16px;
}
.trm-badge-shared {
  font-size: 15px;
  font-weight: 700;
  color: #d97706;
  margin: 0;
}

/* シェアブロック */
.trm-share-block {
  background: #fffbeb;
  border: 2px solid #fcd34d;
  border-radius: var(--trm-radius);
  padding: 16px;
  margin-top: 12px;
  text-align: center;
}
.trm-share-desc {
  font-size: 14px;
  margin: 0 0 12px;
}
.trm-btn-x-share,
.trm-btn-x-share-generic {
  display: inline-block;
  padding: 10px 20px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background .15s;
}
.trm-btn-x-share:hover,
.trm-btn-x-share-generic:hover { background: #333; color: #fff; }
.trm-btn-share-done {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--trm-success);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--trm-radius);
  cursor: pointer;
  transition: background .15s;
}
.trm-btn-share-done:hover { background: #15803d; }
.trm-btn-share-done:disabled { opacity: .5; cursor: wait; }

/* シェア（汎用） */
.trm-share-generic { margin: 16px 0; text-align: center; }

/* 当選発表 */
.trm-winner-announce {
  background: #fef9c3;
  border: 2px solid #fde047;
  border-radius: var(--trm-radius);
  padding: 16px;
  margin: 20px 0;
}
.trm-winner-announce h3 { margin: 0 0 10px; }

/* 注意事項 */
.trm-campaign-notes {
  background: var(--trm-bg);
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  padding: 14px;
  font-size: 13px;
  color: var(--trm-text-mute);
  margin-top: 20px;
}
.trm-campaign-notes h4 { margin: 0 0 8px; font-size: 13px; }

/* 未ログイン誘導 */
.trm-login-prompt {
  background: var(--trm-bg);
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  padding: 20px;
  text-align: center;
}
.trm-login-prompt p { font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.trm-login-prompt .trm-btn-login,
.trm-login-prompt .trm-btn-register {
  display: inline-block;
  margin: 4px;
  padding: 10px 24px;
}

/* ─────────────────────────────────────────
   応募履歴リスト
───────────────────────────────────────── */
.trm-entry-list { margin-top: 16px; }
.trm-entry-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  margin-bottom: 10px;
}
.trm-entry-title {
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: var(--trm-text);
  flex: 1;
  min-width: 0;
}
.trm-entry-title:hover { color: var(--trm-primary); }
.trm-entry-status {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--trm-bg);
}
.trm-entry-status.status-won    { background: #dcfce7; color: var(--trm-success); }
.trm-entry-status.status-lost   { background: #f1f5f9; color: var(--trm-text-mute); }
.trm-entry-status.status-entered{ background: #dbeafe; color: var(--trm-primary); }
.trm-entry-weight { font-size: 12px; color: #d97706; }
.trm-entry-date   { font-size: 12px; color: var(--trm-text-mute); margin-left: auto; }

/* ─────────────────────────────────────────
   マイページ
───────────────────────────────────────── */
.trm-mypage-wrap { max-width: 720px; margin: 0 auto; }
.trm-mypage-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.trm-mypage-avatar img { border-radius: 50%; }
.trm-mypage-username { font-weight: 700; font-size: 16px; margin: 0; }
.trm-mypage-email    { font-size: 13px; color: var(--trm-text-mute); margin: 2px 0 0; }
.trm-btn-logout {
  margin-left: auto;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: var(--trm-text-mute);
  white-space: nowrap;
  transition: background .15s;
}
.trm-btn-logout:hover { background: var(--trm-bg); }

/* タブ */
.trm-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--trm-border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.trm-tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--trm-text-mute);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
}
.trm-tab-btn.active,
.trm-tab-btn:hover {
  color: var(--trm-primary);
  border-bottom-color: var(--trm-primary);
}
.trm-tab-pane { display: none; }
.trm-tab-pane.active { display: block; }

/* ──────────────────────────────────────────
   通知設定パネル（シンプル Notification API 版）
────────────────────────────────────────── */
.trm-push-master {
  background: var(--trm-bg);
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  padding: 20px 16px;
  margin-bottom: 20px;
}
.trm-push-intro {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--trm-text);
  line-height: 1.6;
}

/* 通知状態バッジ行 */
.trm-notif-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.trm-notif-status-label {
  font-size: 13px;
  color: var(--trm-text-mute);
  white-space: nowrap;
}
.trm-notif-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: #eee;
  color: #555;
  transition: background .2s, color .2s;
}
.trm-notif-badge.granted     { background: #e6f9ed; color: #1a7c40; }
.trm-notif-badge.default     { background: #fff7e0; color: #8a6300; }
.trm-notif-badge.denied      { background: #fce8e8; color: #b02020; }
.trm-notif-badge.ios         { background: #eaf3ff; color: #1a5aad; }
.trm-notif-badge.unsupported { background: #f0f0f0; color: #888; }
.trm-notif-badge.checking    { background: #f5f5f5; color: #aaa; }

/* ボタン2つ横並び（スマホでも押しやすい） */
.trm-notif-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.trm-btn-notif {
  flex: 1 1 140px;
  min-width: 130px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-align: center;
  line-height: 1.3;
}
.trm-btn-notif:active { transform: scale(.97); }
.trm-btn-notif:disabled { opacity: .5; cursor: wait; }

.trm-btn-notif-on {
  background: var(--trm-primary);
  color: #fff;
}
.trm-btn-notif-on:hover:not(:disabled) { opacity: .88; }

.trm-btn-notif-test {
  background: #1a7c40;
  color: #fff;
}
.trm-btn-notif-test:hover:not(:disabled) { opacity: .88; }

/* メッセージエリア */
.trm-notif-msg {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--trm-text-mute);
  white-space: pre-line;  /* \n で改行 */
  line-height: 1.6;
}
.trm-notif-msg.success { color: var(--trm-success); font-weight: 600; }
.trm-notif-msg.error   { color: var(--trm-danger);  font-weight: 600; }
.trm-notif-msg.info    { color: #0369a1; }

/* ──────────────────────────────────────────
   フェーズ2: 複合ステータス + 詳細グリッド
────────────────────────────────────────── */

/* 複合バッジ */
.trm-notif-composite-wrap {
  margin-bottom: 16px;
}
.trm-notif-status-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #888;
  transition: background .2s, color .2s;
}
.trm-notif-status-badge[data-state="effective"]   { background: #e6f9ed; color: #1a7c40; }
.trm-notif-status-badge[data-state="off"]         { background: #f0f0f0; color: #666; }
.trm-notif-status-badge[data-state="pending"]     { background: #fff7e0; color: #8a6300; }
.trm-notif-status-badge[data-state="denied"]      { background: #fce8e8; color: #b02020; }
.trm-notif-status-badge[data-state="ios_not_pwa"] { background: #eaf3ff; color: #1a5aad; }
.trm-notif-status-badge[data-state="unsupported"] { background: #f5f5f5; color: #aaa; }

/* 詳細ステータスグリッド */
.trm-notif-detail-grid {
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}
.trm-notif-detail-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--trm-border);
}
.trm-notif-detail-row:last-child {
  border-bottom: none;
}
.trm-notif-detail-label {
  flex: 0 0 100px;
  font-weight: 600;
  color: var(--trm-text-mute);
  font-size: 12px;
  white-space: nowrap;
}
.trm-notif-detail-val {
  flex: 1;
  font-size: 13px;
  color: var(--trm-text);
}

/* ON/OFF インライン表示 */
.trm-pref-on  { color: var(--trm-success); font-weight: 700; }
.trm-pref-off { color: var(--trm-text-mute); }

/* 通知OFFボタン */
.trm-btn-notif-off {
  background: #f1f5f9;
  color: var(--trm-text);
  border: 1px solid var(--trm-border);
}
.trm-btn-notif-off:hover:not(:disabled) { background: #e2e8f0; }

/* iOS向け案内 */
.trm-notif-ios-tip {
  margin: 12px 0;
  padding: 12px 14px;
  background: #eaf3ff;
  border: 1px solid #b3d4ff;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #1a5aad;
}
.trm-notif-ios-tip p { margin: 0; }

/* 後方互換（旧クラスを残す） */
.trm-push-desc { color: var(--trm-text-mute) !important; font-size: 13px !important; }
.trm-btn-push-subscribe {
  display: inline-block;
  padding: 10px 22px;
  background: var(--trm-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}
.trm-btn-push-subscribe:hover { background: var(--trm-primary-h); }
.trm-push-status { margin: 8px 0 0; font-size: 13px; }

/* マイページログインなし */
.trm-mypage-login {
  text-align: center;
  padding: 40px 20px;
}
.trm-mypage-login p { font-size: 15px; margin-bottom: 16px; }
.trm-mypage-login .trm-btn-login,
.trm-mypage-login .trm-btn-register { display: inline-block; margin: 6px; padding: 12px 28px; }

/* ─────────────────────────────────────────
   お知らせリスト
───────────────────────────────────────── */
.trm-news-list { margin-top: 12px; }
.trm-news-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--trm-border);
  flex-wrap: wrap;
}
.trm-news-date { font-size: 13px; color: var(--trm-text-mute); white-space: nowrap; }
.trm-news-cat {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: #dbeafe;
  color: var(--trm-primary);
  border-radius: 999px;
  white-space: nowrap;
}
.trm-news-title {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--trm-text);
}
.trm-news-title:hover { color: var(--trm-primary); }

/* ─────────────────────────────────────────
   空状態
───────────────────────────────────────── */
.trm-empty {
  text-align: center;
  padding: 30px;
  color: var(--trm-text-mute);
  font-size: 14px;
}

/* ─────────────────────────────────────────
   モバイル対応
───────────────────────────────────────── */
@media (max-width: 480px) {
  .trm-modal-box { padding: 24px 16px 20px; }
  .trm-fav-grid  { grid-template-columns: repeat(2, 1fr); }
  .trm-campaign-title { font-size: 18px; }
  .trm-btn-enter { font-size: 15px; padding: 14px; }
  .trm-mypage-header { padding: 12px; gap: 10px; }
  .trm-tab-btn { padding: 10px 12px; font-size: 13px; }
  .trm-entry-item { gap: 6px; }
  .trm-entry-date { margin-left: 0; }
}

/* ═══════════════════════════════════════════
   カスタムログインページ
═══════════════════════════════════════════ */
.trm-login-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background: #f5f6fa;
}

.trm-login-wrap {
  width: 100%;
  max-width: 420px;
}

.trm-login-card {
  background: #fff;
  border: 1px solid var(--trm-border, #e0e0e0);
  border-radius: 12px;
  padding: 40px 36px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.trm-login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
  color: var(--trm-text, #1a1a1a);
}

.trm-login-error {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* WordPress loginform 上書き */
#loginform {
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
}

#loginform p {
  margin-bottom: 14px;
}

#loginform label {
  font-size: 13px;
  font-weight: 600;
  color: var(--trm-text, #333);
  display: block;
  margin-bottom: 5px;
}

#loginform input[type="text"],
#loginform input[type="password"] {
  width: 100%;
  border: 1px solid var(--trm-border, #d0d0d0);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fafafa;
  transition: border-color .2s;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
  border-color: var(--trm-primary, #e91e63);
  outline: none;
  background: #fff;
}

#loginform .forgetmenot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

#loginform input[type="submit"],
#wp-submit {
  width: 100%;
  background: var(--trm-primary, #e91e63);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  margin-top: 6px;
}

#loginform input[type="submit"]:hover,
#wp-submit:hover {
  background: var(--trm-primary-dark, #c2185b);
}

.trm-login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
}

.trm-login-links a {
  color: var(--trm-primary, #e91e63);
  text-decoration: none;
}

.trm-login-links a:hover {
  text-decoration: underline;
}

.trm-login-links-sep {
  color: #bbb;
}

@media (max-width: 480px) {
  .trm-login-card { padding: 28px 20px 24px; }
  .trm-login-title { font-size: 19px; }
}

/* ═══════════════════════════════════════════
   カスタムモバイルナビ（ドロワー）
   max-width:920px で動作
═══════════════════════════════════════════ */

/* ── オーバーレイ ── */
.trm-mnav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99998;
  backdrop-filter: blur(2px);
}
.trm-mnav__overlay.is-open { display: block; }

/* ── ドロワー本体 ── */
.trm-mnav {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 88vw;
  height: 100%;
  background: #fff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.trm-mnav.is-open { transform: translateX(0); }

/* ── ヘッド ── */
.trm-mnav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--trm-primary, #e91e63);
  color: #fff;
  flex-shrink: 0;
}
.trm-mnav__logo {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.trm-mnav__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: background 0.15s;
}
.trm-mnav__close:hover { background: rgba(255,255,255,0.2); }

/* ── 認証エリア ── */
.trm-mnav__auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.trm-mnav__auth-login,
.trm-mnav__auth-register,
.trm-mnav__auth-mypage {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
}
.trm-mnav__auth-login,
.trm-mnav__auth-mypage {
  border: 2px solid var(--trm-primary, #e91e63);
  color: var(--trm-primary, #e91e63);
}
.trm-mnav__auth-register {
  background: var(--trm-primary, #e91e63);
  color: #fff;
}
.trm-mnav__auth-login:hover,
.trm-mnav__auth-register:hover,
.trm-mnav__auth-mypage:hover { opacity: 0.85; }
.trm-mnav__auth-logout {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #888;
  text-decoration: none;
}

/* ── メニューリスト ── */
.trm-mnav__list {
  list-style: none;
  margin: 0;
  padding: 8px 0 32px;
  flex: 1;
}
.trm-mnav__item {
  border-bottom: 1px solid #f4f4f4;
}

/* ── 通常リンク ── */
.trm-mnav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.trm-mnav__link:hover {
  background: #fdf2f6;
  color: var(--trm-primary, #e91e63);
}
.trm-mnav__item.is-current > .trm-mnav__link {
  color: var(--trm-primary, #e91e63);
  background: #fce4ec;
}

/* ── アイコン ── */
.trm-mnav__icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

/* ── NEW バッジ ── */
.trm-mnav__badge {
  margin-left: auto;
  background: var(--trm-primary, #e91e63);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ── 配布強調 ── */
.trm-mnav__item--featured > .trm-mnav__link {
  color: var(--trm-primary, #e91e63);
}

/* ── LINE ── */
.trm-mnav__link--line { color: #06c755; }
.trm-mnav__link--line:hover { background: #f0fff4; color: #05a946; }

/* ── アコーディオンボタン ── */
.trm-mnav__accordion-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.trm-mnav__accordion-btn:hover {
  background: #fdf2f6;
  color: var(--trm-primary, #e91e63);
}
.trm-mnav__item--accordion.is-current > .trm-mnav__accordion-btn {
  color: var(--trm-primary, #e91e63);
}
.trm-mnav__arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.22s;
  display: inline-block;
}
.trm-mnav__accordion-btn[aria-expanded="true"] .trm-mnav__arrow {
  transform: rotate(180deg);
}

/* ── サブメニュー ── */
.trm-mnav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
  background: #fafafa;
}
.trm-mnav__item--accordion.is-open .trm-mnav__sub {
  max-height: 200px;
}
.trm-mnav__sub-link {
  display: block;
  padding: 12px 20px 12px 56px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.trm-mnav__sub-link:hover {
  background: #fce4ec;
  color: var(--trm-primary, #e91e63);
}
.trm-mnav__sub-link.is-current {
  color: var(--trm-primary, #e91e63);
  font-weight: 700;
}

/* デスクトップでは非表示 */
@media (min-width: 921px) {
  .trm-mnav,
  .trm-mnav__overlay,
  .trm-auth-strip {
    display: none !important;
  }
}

/* Astraのモバイルナビを非表示（カスタムドロワーで置換） */
@media (max-width: 920px) {
  #ast-mobile-header .ast-site-header-nav { display: none !important; }
}

/* ═══════════════════════════════════════════
   モバイル認証ストリップ（ヘッダー直下）
   未ログイン時のみ・モバイル専用
═══════════════════════════════════════════ */
.trm-auth-strip { display: none; }

@media (max-width: 920px) {
  .trm-auth-strip {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  }
  .trm-auth-strip__login,
  .trm-auth-strip__register {
    flex: 1;
    display: block;
    text-align: center;
    padding: 9px 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s;
  }
  .trm-auth-strip__login {
    border: 2px solid var(--trm-primary, #e91e63);
    color: var(--trm-primary, #e91e63);
  }
  .trm-auth-strip__register {
    background: var(--trm-primary, #e91e63);
    color: #fff;
  }
  .trm-auth-strip__login:hover,
  .trm-auth-strip__register:hover { opacity: 0.85; }
}

/* ═══════════════════════════════════════════
   ホームページ 配布バナー
═══════════════════════════════════════════ */
.trm-hb-wrap {
  margin: 0 0 28px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  box-shadow: 0 4px 20px rgba(233,30,99,0.3);
}
.trm-hb-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
}
.trm-hb-icon {
  font-size: 44px;
  flex-shrink: 0;
  line-height: 1;
}
.trm-hb-text { flex: 1; min-width: 0; }
.trm-hb-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}
.trm-hb-desc {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
}
.trm-hb-btn {
  display: block;
  flex-shrink: 0;
  background: #fff;
  color: var(--trm-primary, #e91e63);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}
.trm-hb-btn:hover { opacity: 0.9; transform: scale(1.04); }

@media (max-width: 600px) {
  .trm-hb-inner { flex-wrap: wrap; gap: 12px; padding: 18px; }
  .trm-hb-icon  { font-size: 36px; }
  .trm-hb-title { font-size: 16px; }
  .trm-hb-btn   { width: 100%; text-align: center; padding: 12px; font-size: 14px; }
}

/* ═══════════════════════════════════════════
   配布キャンペーン一覧ページ（新デザイン）
═══════════════════════════════════════════ */

/* ── ラッパー ── */
.trg-dist-wrap {
  --dist-bg:     #F5F0E6;
  --dist-ink:    #111110;
  --dist-muted:  #6B6355;
  --dist-border: #DCD3BE;
  --dist-card:   #FFFDF7;
  --dist-accent: #C34A2C;
  --dist-radius: 2px;
  font-family: inherit;
  color: var(--dist-ink);
  background: var(--dist-bg);
  padding: 0;
}

/* ── フィルタータブ行 ── */
.trg-dist-filter-row {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(245, 240, 230, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--dist-border);
  margin-bottom: 0;
}

.trg-dist-segment {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.trg-dist-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--dist-muted);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.trg-dist-tab:hover {
  background: rgba(17,17,16,0.06);
  color: var(--dist-ink);
}
.trg-dist-tab.is-active {
  background: var(--dist-ink);
  color: #fff;
  border-color: transparent;
}

.trg-dist-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.22);
  color: inherit;
}
.trg-dist-tab:not(.is-active) .trg-dist-badge {
  background: rgba(17,17,16,0.1);
  color: var(--dist-muted);
}

.trg-dist-sort-hint {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--dist-muted);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .trg-dist-sort-hint { display: none; }
}

/* ── カードリスト ── */
.trg-dist-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── カード ── */
.trg-dist-card {
  background: var(--dist-card);
  border-bottom: 1px solid var(--dist-border);
  overflow: hidden;
  transition: background 0.12s;
}
.trg-dist-card:first-child {
  border-top: 1px solid var(--dist-border);
}
.trg-dist-card.is-ended {
  opacity: 0.7;
}

/* ── カードメディア（16:9） ── */
.trg-dist-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #E8E2D6;
}
.trg-dist-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.trg-dist-card:hover .trg-dist-card-img {
  transform: scale(1.03);
}
.trg-dist-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #A89E8C;
  text-transform: uppercase;
  background: #E8E2D6;
}

/* ステータスドット */
.trg-dist-status {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.trg-dist-status.is-live {
  background: rgba(255,255,255,0.88);
  color: #166534;
}
.trg-dist-status.is-ended {
  background: rgba(0,0,0,0.52);
  color: #fff;
}
.trg-dist-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.is-live .trg-dist-dot {
  background: #22c55e;
  animation: trg-pulse 1.8s ease-in-out infinite;
}
.is-ended .trg-dist-dot {
  background: #9ca3af;
}
@keyframes trg-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.25); }
}

/* 商品タグ */
.trg-dist-product-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 3px 10px;
  background: var(--dist-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--dist-radius);
  letter-spacing: 0.04em;
}

/* カウントダウン */
.trg-dist-countdown {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: rgba(0,0,0,0.62);
  color: #fff;
  padding: 4px 9px;
  border-radius: var(--dist-radius);
  backdrop-filter: blur(4px);
}
.trg-dist-cnt-num {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.trg-dist-cnt-lbl {
  font-size: 11px;
  font-weight: 600;
}

/* ── カードボディ ── */
.trg-dist-card-body {
  padding: 20px 20px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* キッカー（Vol. · 名様） */
.trg-dist-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--dist-muted);
  text-transform: uppercase;
}
.trg-dist-kicker-sep {
  color: var(--dist-border);
}

/* タイトル */
.trg-dist-card-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  line-height: 1.38;
  color: var(--dist-ink);
  letter-spacing: -0.01em;
}

/* リード文 */
.trg-dist-card-lede {
  font-size: 13px;
  line-height: 1.6;
  color: var(--dist-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 条件プレビューリスト */
.trg-dist-cond-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.trg-dist-cond-preview li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dist-ink);
}
.trg-dist-cond-num {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--dist-accent);
  flex-shrink: 0;
  min-width: 18px;
}

/* 期間 */
.trg-dist-period {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dist-muted);
  font-weight: 500;
}
.trg-dist-period-arrow {
  color: var(--dist-border);
}

/* ── アクションボタン ── */
.trg-dist-actions {
  padding: 14px 20px 16px;
}
.trg-dist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--dist-radius);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.14s, opacity 0.14s, transform 0.08s;
  text-align: center;
  box-sizing: border-box;
}
.trg-dist-btn:active { transform: scale(0.98); }

.trg-dist-btn.btn-primary {
  background: var(--dist-ink);
  color: #fff;
}
.trg-dist-btn.btn-primary:hover {
  background: #2a2a28;
}
.trg-dist-btn.btn-twitter-required {
  background: #000;
  color: #fff;
}
.trg-dist-btn.btn-twitter-required:hover {
  background: #222;
}

.trg-dist-btn.btn-entered {
  background: #E8E2D6;
  color: var(--dist-muted);
  cursor: default;
}
.trg-dist-btn.btn-ended,
.trg-dist-btn.btn-soon {
  background: #E0DAD0;
  color: #A89E8C;
  cursor: default;
}

/* ── アコーディオン（disclose） ── */
.trg-dist-disclose {
  border-top: 1px solid var(--dist-border);
}

.trg-dist-disclose-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--dist-muted);
  letter-spacing: 0.03em;
  text-align: left;
  transition: color 0.12s, background 0.12s;
}
.trg-dist-disclose-trigger:hover {
  color: var(--dist-ink);
  background: rgba(17,17,16,0.03);
}

.trg-dist-chev {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  color: var(--dist-muted);
  flex-shrink: 0;
}

/* パネル本体（高さトランジション） */
.trg-dist-disclose-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.trg-dist-disclose-panel.is-open {
  max-height: 1400px;
}

.trg-dist-panel-inner {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FAF6EE;
  border-top: 1px solid var(--dist-border);
}

/* パネル内：期間行 */
.trg-dist-panel-period {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--dist-muted);
}

/* パネル内：条件・注意ブロック */
.trg-dist-panel-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trg-dist-panel-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dist-muted);
}
.trg-dist-panel-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--dist-ink);
}

/* パネル内：応募エリア */
.trg-dist-entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trg-dist-msg {
  font-size: 13px;
  color: var(--dist-muted);
  margin: 0;
}

/* no-results */
.trg-dist-no-results {
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  color: var(--dist-muted);
}

/* ── 既存 AJAX クラス（新レイアウト内で再定義） ── */
.trm-acc-login-prompt {
  text-align: center;
}
.trm-acc-login-prompt > p {
  font-size: 13px;
  color: var(--dist-muted, #6B6355);
  margin: 0 0 10px;
}
.trm-acc-auth-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 応募済み */
.trm-acc-entered {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trm-acc-entered .trm-share-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trm-badge-entered {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  margin: 0;
}
.trm-badge-shared {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin: 0;
}
.trm-acc-entered .trm-share-desc {
  font-size: 13px;
  margin: 0;
}
.trm-acc-entered .trm-btn-x-share {
  display: block;
  padding: 11px;
  background: #000;
  color: #fff;
  text-align: center;
  border-radius: var(--dist-radius, 2px);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}
.trm-acc-entered .trm-btn-x-share:hover { background: #222; }
.trm-acc-entered .trm-btn-share-done {
  display: block;
  width: 100%;
  padding: 11px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: var(--dist-radius, 2px);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.trm-acc-entered .trm-btn-share-done:hover { background: #047857; }

/* X応募フロー */
.trm-acc-x-apply {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trm-x-apply-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--dist-ink, #111110);
  margin: 0;
}
.trm-x-apply-hint {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
  line-height: 1.6;
}
.trm-acc-x-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: var(--dist-radius, 2px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.trm-acc-x-btn:hover { background: #1a1a1a; }
.trm-acc-x-btn:active { transform: scale(0.98); }
.trm-acc-x-btn:disabled { background: #6B7280; cursor: not-allowed; }

/* 確認エリア */
.trm-acc-x-confirm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trm-x-posted-msg {
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  margin: 0;
  padding: 8px 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 4px;
}
.trm-x-return-hint {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
  line-height: 1.6;
}
.trm-acc-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 16px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: var(--dist-radius, 2px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.trm-acc-confirm-btn:hover { background: #047857; }
.trm-acc-confirm-btn:active { transform: scale(0.98); }
.trm-acc-confirm-btn:disabled { background: #6B7280; cursor: not-allowed; }

/* エラー */
.trm-acc-error {
  font-size: 12px;
  color: var(--trm-danger, #dc2626);
  margin: 0;
}

/* ── レスポンシブ：640px以上でカード2列 ── */
@media (min-width: 640px) {
  .trg-dist-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--dist-border);
  }
  .trg-dist-card {
    border-top: none;
    border-right: 1px solid var(--dist-border);
    border-bottom: 1px solid var(--dist-border);
    border-left: none;
  }
  .trg-dist-card:first-child { border-top: none; }
  .trg-dist-list > .trg-dist-card:nth-child(2n) { border-right: none; }
  .trg-dist-card-title { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════
   お知らせ一覧（カテゴリ分類）
═══════════════════════════════════════════════════ */

.trm-notice-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* セクション（カテゴリグループ） */
.trm-notice-section {
  margin-bottom: 40px;
}
.trm-notice-section:last-child {
  margin-bottom: 0;
}

/* セクション見出し（通常） */
.trm-notice-heading {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 2px solid #E5E7EB;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* セクション見出し（抽選発表：強調） */
.trm-notice-heading-lottery {
  font-size: 16px;
  font-weight: 800;
  color: #B45309;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-left: 4px solid #F59E0B;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* お知らせリスト */
.trm-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 各お知らせ項目 */
.trm-notice-item {
  border-bottom: 1px solid #F3F4F6;
}
.trm-notice-item:last-child {
  border-bottom: none;
}

/* 抽選発表項目（強調） */
.trm-notice-item-lottery {
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
  border-radius: 6px;
  margin-bottom: 6px;
}
.trm-notice-item-lottery:last-child {
  margin-bottom: 0;
}

/* リンク（行全体） */
.trm-notice-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  border-radius: 6px;
}
.trm-notice-link:hover {
  background: #F9FAFB;
}
.trm-notice-item-lottery .trm-notice-link {
  padding: 12px 10px;
}
.trm-notice-item-lottery .trm-notice-link:hover {
  background: #FEF3C7;
}

/* 日付 */
.trm-notice-date {
  font-size: 12px;
  color: #9CA3AF;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
}

/* カテゴリバッジ（通常） */
.trm-notice-cat {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: #F3F4F6;
  color: #6B7280;
  white-space: nowrap;
  flex-shrink: 0;
}

/* カテゴリバッジ（抽選発表） */
.trm-notice-cat-lottery {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: #FDE68A;
  color: #92400E;
  white-space: nowrap;
  flex-shrink: 0;
}

/* タイトル */
.trm-notice-title {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
  line-height: 1.5;
  flex: 1;
}
.trm-notice-item-lottery .trm-notice-title {
  color: #92400E;
}

/* レスポンシブ：スマホ */
@media (max-width: 480px) {
  .trm-notice-link {
    flex-wrap: wrap;
    gap: 6px;
  }
  .trm-notice-date {
    font-size: 11px;
    min-width: auto;
  }
  .trm-notice-title {
    font-size: 13px;
    width: 100%;
    order: 3;
  }
}


/* ============================================================
   いいね & ブックマーク機能  （trm-likes-bookmarks）
   CSS クラス規則:
     .is-active   → いいね済み / ブックマーク済み
     .is-loading  → 通信中（連打防止）
     .is-disabled → 操作不可
     .is-hidden   → 非表示
   ============================================================ */

/* ──────────────────────────────────────────
   タブバッジ（件数）（要件 #13-B）
────────────────────────────────────────── */
.trm-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  background: var(--trm-danger);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  transition: opacity .2s;
}
.trm-tab-badge.is-hidden {
  display: none;
}
.trm-section-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--trm-text-mute);
  margin-left: 6px;
}

/* ──────────────────────────────────────────
   ❤️ いいねボタン
────────────────────────────────────────── */
.trm-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .1s;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1.4;
}
.trm-like-btn:hover:not(.is-loading):not(.is-disabled) {
  border-color: #fca5a5;
  color: #ef4444;
  background: #fff5f5;
}
/* is-active = いいね済み（PHP 初期状態・JS 更新後どちらでも） */
.trm-like-btn.is-active {
  border-color: #ef4444;
  background: #fef2f2;
  color: #ef4444;
}
.trm-like-btn.is-active .trm-like-icon {
  animation: trm-heart-pop .25s ease;
}
/* is-loading = 通信中（要件 #7） */
.trm-like-btn.is-loading {
  opacity: .6;
  cursor: wait;
  pointer-events: none;
}
/* is-disabled */
.trm-like-btn.is-disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}
.trm-like-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform .18s;
  flex-shrink: 0;
}
.trm-like-btn:hover:not(.is-loading) .trm-like-icon {
  transform: scale(1.15);
}
.trm-like-count {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #ef4444;
  min-width: 16px;
}

@keyframes trm-heart-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ──────────────────────────────────────────
   🔖 ブックマークボタン
────────────────────────────────────────── */
.trm-bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1.4;
}
.trm-bookmark-btn:hover:not(.is-loading):not(.is-disabled) {
  border-color: #fbbf24;
  color: #d97706;
  background: #fffbeb;
}
/* is-active = ブックマーク済み */
.trm-bookmark-btn.is-active {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #d97706;
}
/* is-loading */
.trm-bookmark-btn.is-loading {
  opacity: .6;
  cursor: wait;
  pointer-events: none;
}
/* is-disabled */
.trm-bookmark-btn.is-disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}
.trm-bookmark-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
.trm-bookmark-count {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  min-width: 14px;
}

/* ──────────────────────────────────────────
   マイページ：いいねグリッド
────────────────────────────────────────── */
.trm-likes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.trm-like-card {
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  overflow: hidden;
  box-shadow: var(--trm-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s;
}
.trm-like-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.trm-like-card > a {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: block;
}
.trm-like-card > a img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.trm-like-card-nothumb {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  font-size: 40px;
}
.trm-like-card-body {
  padding: 10px;
}
.trm-like-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--trm-text);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trm-like-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--trm-primary);
  margin: 0;
}
/* カード内のいいねボタン */
.trm-like-card > .trm-like-btn {
  margin: 0 10px 10px;
  width: calc(100% - 20px);
  justify-content: center;
  border-radius: var(--trm-radius);
}

/* ──────────────────────────────────────────
   マイページ：ブックマークリスト
────────────────────────────────────────── */
.trm-bookmark-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.trm-bookmark-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--trm-border);
  border-radius: var(--trm-radius);
  padding: 12px;
  box-shadow: var(--trm-shadow);
  transition: box-shadow .18s;
}
.trm-bookmark-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
}
.trm-bookmark-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.trm-bookmark-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.trm-bookmark-meta {
  flex: 1;
  min-width: 0;
}
.trm-bookmark-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.trm-bookmark-date {
  font-size: 12px;
  color: var(--trm-text-mute);
}
.trm-bookmark-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--trm-primary);
  background: #eff6ff;
  border-radius: 4px;
  padding: 1px 7px;
}
.trm-bookmark-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--trm-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trm-bookmark-title:hover {
  color: var(--trm-primary);
  text-decoration: underline;
}
/* リスト内ブックマークボタン（アイコンのみ） */
.trm-bookmark-item > .trm-bookmark-btn {
  flex-shrink: 0;
  padding: 6px 8px;
}
.trm-bookmark-item > .trm-bookmark-btn .trm-bookmark-label {
  display: none;
}

/* ──────────────────────────────────────────
   ログインモーダル
────────────────────────────────────────── */
.trm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}
.trm-modal.trm-modal--open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.trm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.trm-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  padding: 40px 32px 32px;
  width: min(92vw, 360px);
  text-align: center;
  animation: trm-modal-in .22s ease;
}
@keyframes trm-modal-in {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.trm-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.trm-modal__close:hover { color: #1e293b; }
.trm-modal__icon  { font-size: 40px; margin: 0 0 10px; }
.trm-modal__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--trm-text);
  margin: 0 0 8px;
}
.trm-modal__desc {
  font-size: 13px;
  color: var(--trm-text-mute);
  margin: 0 0 20px;
  line-height: 1.6;
}
.trm-modal__btn {
  display: block;
  padding: 13px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
  transition: opacity .15s;
}
.trm-modal__btn:hover { opacity: .85; }
.trm-modal__btn--login    { background: #111827; color: #fff; }
.trm-modal__btn--register { background: #f59e0b; color: #fff; }

/* ──────────────────────────────────────────
   トースト通知（要件 #8）
────────────────────────────────────────── */
.trm-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  z-index: 99998;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  white-space: nowrap;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.trm-toast.trm-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.trm-toast.trm-toast--error   { background: #dc2626; }
.trm-toast.trm-toast--success { background: #16a34a; }
.trm-toast.trm-toast--info    { background: #2563eb; }

/* ──────────────────────────────────────────
   モバイル調整
────────────────────────────────────────── */
@media (max-width: 480px) {
  .trm-likes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .trm-like-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
  .trm-bookmark-item {
    padding: 10px;
    gap: 10px;
  }
  .trm-bookmark-thumb {
    width: 52px;
    height: 52px;
  }
  .trm-bookmark-title {
    font-size: 13px;
  }
  .trm-toast {
    bottom: 60px;
    font-size: 13px;
    padding: 9px 16px;
  }
}

/* ──────────────────────────────────────────
   シングルページ ボタン配置
────────────────────────────────────────── */
.trm-content-like,
.trm-content-bookmark {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 在庫カード内のいいねボタン */
.account-info .trm-like-btn {
  display: inline-flex;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
}

/* お知らせ一覧（trm-news-item）内のブックマークボタン */
.trm-news-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.trm-news-item .trm-bookmark-btn {
  margin-left: auto;
  flex-shrink: 0;
}
.trm-news-item .trm-bookmark-btn .trm-bookmark-label {
  display: none;
}
