/*
 * nr-engagement.css — 共通エンゲージメント層のスタイル
 * DESIGN.md のトークン (--gold #1d7f96 / --bg / --border) を継承
 * z-index 規定: sticky CTA 200 以下、header 300、modal 400+
 */

/* ── #1 ヘッダー進捗ウィジェット ── */
.nr-progress-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
}
.nr-progress-widget .nr-pw-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(29,127,150, 0.08);
  border: 1px solid rgba(29,127,150, 0.18);
  transition: background 0.15s, border-color 0.15s;
}
.nr-progress-widget .nr-pw-link:hover {
  background: rgba(29,127,150, 0.14);
  border-color: rgba(29,127,150, 0.36);
}
.nr-progress-widget .nr-pw-xp,
.nr-progress-widget .nr-pw-streak {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(51,65,74, 0.78);
  line-height: 1;
  letter-spacing: -0.1px;
}
.nr-progress-widget .nr-pw-xp svg { color: var(--header-accent, #1d7f96); }
.nr-progress-widget .nr-pw-streak svg { color: rgba(51,65,74,0.7); }

/* ストリーク・フリーズ (§5.4 お守り): 在庫枚数を氷結チップで表示
 * 淡いアイス系の背景で XP/streak と視覚的に分離。数字は控えめ */
.nr-progress-widget .nr-pw-freeze {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.1px;
  color: #2a7ba8;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(45,123,168, 0.10);
  border: 1px solid rgba(45,123,168, 0.20);
}

/* streak 熱量段階: 日数が伸びるほど色が濃くなる視覚 progression
 * cool (1-2) → デフォルト / warm (3-6) → gold / hot (7-29) → 朱 / blaze (30+) → 緋
 */
.nr-progress-widget .nr-pw-streak.tier-warm,
.nr-progress-widget .nr-pw-streak.tier-warm svg { color: #C58110; }
.nr-progress-widget .nr-pw-streak.tier-hot,
.nr-progress-widget .nr-pw-streak.tier-hot svg { color: #E0581F; }
.nr-progress-widget .nr-pw-streak.tier-blaze,
.nr-progress-widget .nr-pw-streak.tier-blaze svg { color: #C53A1B; }
.nr-progress-widget .nr-pw-streak.tier-blaze svg {
  filter: drop-shadow(0 0 4px rgba(197, 58, 27, 0.55));
}

/* at-risk pulse: 本日未学習で日没後、widget が脈打って復帰を促す
 * watching < risk < critical の順で強度↑ (motion-reduce 設定で停止)
 */
@keyframes nr-pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes nr-pulse-hard { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: 0.6; } }
.nr-progress-widget .nr-pw-streak.risk-watching svg { animation: nr-pulse-soft 2.4s ease-in-out infinite; }
.nr-progress-widget .nr-pw-streak.risk-risk svg { animation: nr-pulse-soft 1.6s ease-in-out infinite; }
.nr-progress-widget .nr-pw-streak.risk-critical svg { animation: nr-pulse-hard 1.1s ease-in-out infinite; color: #C53A1B; }
.nr-progress-widget .nr-pw-streak.risk-critical { color: #C53A1B; }
@media (prefers-reduced-motion: reduce) {
  .nr-progress-widget .nr-pw-streak svg { animation: none !important; }
}

@media (max-width: 768px) {
  .nr-progress-widget {
    margin-left: 0;
    margin-right: 6px;
  }
  .nr-progress-widget .nr-pw-link { padding: 3px 8px; gap: 5px; }
  .nr-progress-widget .nr-pw-xp,
  .nr-progress-widget .nr-pw-streak { font-size: 10.5px; }
  .nr-progress-widget .nr-pw-freeze { font-size: 10px; padding: 2px 5px; }
}

/* ── #4 streak ソフトバナー ──
 * 配置メモ: bottom: 88px は画面下部の固定 UI (bottom: 0 で fixed) と
 * 視覚的に重ならないオフセット。z-index: 199 は header (300) より下。
 */
.nr-streak-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 88px;
  z-index: 199;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.nr-streak-banner-inner {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(51,65,74, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  max-width: 560px;
}
.nr-streak-banner-icon { font-size: 20px; line-height: 1; flex: 0 0 auto; }
.nr-streak-banner-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.nr-streak-banner-text b { color: #1d7f96; }
.nr-streak-banner-sub {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.02em;
}
.nr-streak-banner-btn {
  background: linear-gradient(135deg, #1d7f96, #186f83);
  color: #fff;
  padding: 7px 14px;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}
.nr-streak-banner-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex: 0 0 auto;
}

/* リスク種別ごとの色調整 — risk は朱、lost は緑 (柔らかい再起動トーン) */
.nr-streak-banner.nr-streak-risk .nr-streak-banner-inner {
  background: linear-gradient(135deg, rgba(51,65,74, 0.96), rgba(60, 28, 20, 0.96));
}
.nr-streak-banner.nr-streak-risk .nr-streak-banner-text b { color: #FFB74D; }
.nr-streak-banner.nr-streak-lost .nr-streak-banner-inner {
  background: linear-gradient(135deg, rgba(38, 51, 38, 0.96), rgba(28, 42, 30, 0.96));
}
.nr-streak-banner.nr-streak-lost .nr-streak-banner-text b { color: #A6D879; }
.nr-streak-banner.nr-streak-lost .nr-streak-banner-btn {
  background: linear-gradient(135deg, #7BA84A, #6B7F38);
}

/* ── #2 「次の 30 秒」レコメンドカード ── */
.nr-recommend-card {
  max-width: 480px;
  margin: 24px auto;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(29,127,150, 0.06), rgba(29,127,150, 0.02));
  border: 1px solid rgba(29,127,150, 0.24);
  padding: 16px;
}
.nr-rc-head {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #186f83;
  margin-bottom: 10px;
}
.nr-rc-body {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 10px 4px;
  border-radius: 12px;
  transition: background 0.15s;
}
.nr-rc-body:hover { background: rgba(29,127,150, 0.06); }
.nr-rc-title {
  font-size: 16px;
  font-weight: 900;
  color: rgba(51,65,74, 0.92);
  flex: 0 0 auto;
  letter-spacing: -0.2px;
}
.nr-rc-hint {
  font-size: 13px;
  color: rgba(51,65,74,0.74);
  flex: 1;
}
.nr-rc-arrow {
  font-size: 20px;
  color: #1d7f96;
  font-weight: 700;
  flex: 0 0 auto;
}
.nr-rc-coach {
  display: block;
  margin-top: 10px;
  padding: 10px 4px 2px;
  border-top: 1px solid rgba(29,127,150, 0.18);
  font-size: 13px;
  font-weight: 700;
  color: #14596a;
  text-decoration: none;
}
.nr-rc-coach:hover { color: #186f83; }
.nr-rc-ai {
  display: block;
  margin-top: 10px;
  padding: 10px 4px 2px;
  border-top: 1px solid rgba(29,127,150, 0.18);
  font-size: 13px;
  font-weight: 700;
  color: #14596a;
  text-decoration: none;
}
.nr-rc-ai:hover { color: #186f83; }

/* 完了画面の主 CTA (/ai/ 入口)。Design System v3 のメイン CTA = コーラル押しボタン */
.nr-rc-ai-primary {
  display: block;
  margin: 2px 0 12px;
  padding: 13px 18px;
  border-radius: 9999px;
  background: var(--coral, #ef8577);
  box-shadow: 0 4px 0 var(--coral-dark, #d96c5e);
  color: #fff;
  text-align: center;
  text-decoration: none;
  transition: transform 0.08s, box-shadow 0.08s;
}
.nr-rc-ai-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--coral-dark, #d96c5e);
}
.nr-rc-ai-main {
  display: block;
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.4;
}
.nr-rc-ai-sub {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.92;
}

/* ── 記事末尾の AI/Pro CTA (2026-07-14) ── */
.nr-article-cta {
  margin: 40px 0 8px;
  padding: 24px 22px;
  border: 1px solid var(--teal-pale, #cfe3e8);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(29,127,150, 0.06), rgba(29,127,150, 0.02));
  text-align: center;
}
.nr-ac-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-text, #186f83);
  margin-bottom: 8px;
}
.nr-ac-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
  color: rgba(51,65,74, 0.94);
  margin-bottom: 8px;
}
.nr-ac-sub {
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(51,65,74, 0.72);
  max-width: 480px;
  margin: 0 auto 16px;
}
.nr-ac-btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 9999px;
  background: var(--coral, #ef8577);
  box-shadow: 0 4px 0 var(--coral-dark, #d96c5e);
  color: #fff;
  font-size: 14.5px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.08s, box-shadow 0.08s;
}
.nr-ac-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--coral-dark, #d96c5e);
}
.nr-ac-pro {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-text, #186f83);
  text-decoration: none;
}
.nr-ac-pro:hover { text-decoration: underline; }

/* ── #7 micro-reward combo ── */
.nr-combo-pop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 401;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.16, 1.2, 0.3, 1);
}
.nr-combo-pop.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.nr-combo-n {
  font-size: 56px;
  font-weight: 900;
  color: #1d7f96;
  text-shadow: 0 4px 16px rgba(29,127,150, 0.45);
  letter-spacing: -2px;
  line-height: 1;
}
.nr-combo-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(51,65,74, 0.88);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── #9 セッションリプレイカード ── */
.nr-replay-card {
  max-width: 540px;
  margin: 20px auto;
  background: #ffffff;
  border: 1px solid #e5dfd2;
  border-radius: 16px;
  padding: 18px 20px;
}
.nr-replay-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(51,65,74,0.7);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nr-replay-idx {
  font-size: 11px;
  color: rgba(51,65,74,0.7);
  text-transform: none;
  letter-spacing: 0;
}
.nr-replay-q {
  font-size: 16px;
  font-weight: 700;
  color: rgba(51,65,74, 0.92);
  margin-bottom: 8px;
  line-height: 1.5;
}
.nr-replay-a {
  font-size: 15px;
  color: #6B7F38;
  font-weight: 600;
  margin-bottom: 8px;
}
.nr-replay-hint {
  font-size: 13px;
  color: rgba(51,65,74,0.74);
  padding: 8px 10px;
  background: rgba(51,65,74, 0.04);
  border-radius: 8px;
  margin-bottom: 12px;
}
.nr-replay-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}
.nr-replay-nav button {
  flex: 1;
  min-height: 44px;
  border: 1px solid #e5dfd2;
  background: #FFFFFF;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: rgba(51,65,74, 0.88);
  transition: all 0.15s;
}
.nr-replay-nav button:hover:not(:disabled) {
  background: rgba(51,65,74, 0.04);
}
.nr-replay-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── #5 LP 「続きから」CTA ── */
.nr-continue-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #186f83, #1d7f96);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(29,127,150, 0.22);
  max-width: 420px;
  margin: 18px auto;
  transition: transform 0.15s, box-shadow 0.15s;
}
.nr-continue-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(29,127,150, 0.32);
}
.nr-cc-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.nr-cc-tool {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.4px;
}
.nr-cc-meta {
  font-size: 12px;
  opacity: 0.88;
  font-weight: 600;
}

/* ── #8 統一モードタブ ── */
.nr-mode-tabs {
  display: flex;
  gap: 0;
  margin: 12px auto 16px;
  max-width: 540px;
  border-bottom: 1px solid #e5dfd2;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nr-mode-tab {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(51,65,74,0.7);
  cursor: pointer;
  border-radius: 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s;
}
.nr-mode-tab:hover { color: rgba(51,65,74, 0.88); }
.nr-mode-tab.active {
  color: rgba(51,65,74, 0.92);
  font-weight: 900;
  box-shadow: var(--gold, #1d7f96) 0 -3px 0 0 inset;
}
.nr-mode-tab .nr-tab-badge {
  display: inline-block;
  margin-left: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(29,127,150, 0.18);
  color: #186f83;
}

/* ── デイリーミッションカード ──
 * LP / トップ / /my/ に inject。「3 ツールで 30 XP」の進捗を可視化。
 * 進行中ツール SPA には出さない (renderDailyMissionCard 側で skip)。
 */
.nr-daily-mission {
  max-width: 540px;
  margin: 16px auto;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #e5dfd2;
  border-radius: 16px;
}
.nr-daily-mission.complete {
  background: linear-gradient(135deg, rgba(29,127,150, 0.10), rgba(29,127,150, 0.03));
  border-color: rgba(29,127,150, 0.36);
}
.nr-dm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.nr-dm-title {
  font-size: 13px;
  font-weight: 900;
  color: rgba(51,65,74, 0.88);
  letter-spacing: -0.2px;
}
.nr-dm-progress {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(51,65,74,0.7);
  letter-spacing: 0;
}
.nr-dm-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.nr-dm-dot {
  width: 22px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(51,65,74, 0.08);
  transition: background 0.25s ease;
}
.nr-dm-dot.done {
  background: var(--gold, #1d7f96);
}
.nr-dm-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgba(51,65,74, 0.06);
  overflow: hidden;
}
.nr-dm-fill {
  height: 100%;
  background: linear-gradient(90deg, #186f83, #1d7f96, #8dc2cd);
  border-radius: 9999px;
  transition: width 0.4s ease;
}
.nr-dm-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}
.nr-dm-target {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(51,65,74,0.74);
}
.nr-dm-hint {
  font-size: 11.5px;
  color: rgba(51,65,74,0.7);
}
.nr-dm-done-text {
  font-size: 12px;
  font-weight: 700;
  color: #186f83;
}
/* デイリーミッション: 達成までの一手 CTA */
.nr-dm-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(29,127,150, 0.12), rgba(29,127,150, 0.04));
  border: 1px solid rgba(29,127,150, 0.32);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.12s ease;
}
.nr-dm-cta:hover { background: linear-gradient(135deg, rgba(29,127,150, 0.18), rgba(29,127,150, 0.07)); }
.nr-dm-cta:active { transform: scale(0.985); }
.nr-dm-cta-lead {
  font-size: 12px;
  font-weight: 700;
  color: rgba(51,65,74,0.74);
}
.nr-dm-cta-tool {
  font-size: 13px;
  font-weight: 900;
  color: #14596a;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* ── 「もう一回」延長ボタン ──
 * completion 画面の wrap 内に inject。離脱直前に「もう30秒」の選択肢を提示。
 */
.nr-extend-row {
  display: flex;
  justify-content: center;
  margin: 14px auto 4px;
  max-width: 480px;
}
.nr-extend-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  min-height: 48px;
  background: rgba(29,127,150, 0.08);
  border: 1px solid rgba(29,127,150, 0.32);
  color: #186f83;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.nr-extend-btn:hover {
  background: rgba(29,127,150, 0.14);
  border-color: rgba(29,127,150, 0.5);
}
.nr-extend-btn:active { transform: scale(0.97); }
.nr-extend-icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

/* ── 完走シェア導線 (エンジンD・v2 2026-07-27) ──
 * completion 画面の wrap 内に 1 日 1 回だけ inject。
 * v1 (ghost ボタン単体・末尾配置) は 7d shown227/click0 で埋没と判定し、
 * 投稿本文プレビュー付きカードへ再設計。
 */
.nr-share-card {
  max-width: 480px;
  margin: 16px auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: #FDFCF9;
  border: 1px solid #E8E4DC;
  text-align: center;
}
.nr-share-head {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(26,26,26,0.62);
  margin-bottom: 8px;
}
.nr-share-preview {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(26,26,26,0.88);
  background: rgba(51,65,74,0.04);
  border: 1px solid #E8E4DC;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  text-align: left;
}
.nr-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  min-height: 44px;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  color: #fff;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.nr-share-btn:hover { background: #33414a; }
.nr-share-btn:active { transform: scale(0.97); }
.nr-share-icon {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

/* ── /my/ NRE サマリー (#6 ダッシュボード) ── */
.nre-summary {
  margin: 0 0 20px;
}
.nre-summary[hidden] { display: none; }

/* ── /my/ ダッシュボード補助 ── */
.nr-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.nr-dash-card {
  background: #ffffff;
  border: 1px solid #e5dfd2;
  border-radius: 14px;
  padding: 14px 16px;
}
.nr-dash-card .nr-dc-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(51,65,74,0.7);
  margin-bottom: 6px;
}
.nr-dash-card .nr-dc-value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: rgba(51,65,74, 0.92);
  line-height: 1.1;
}
.nr-dash-card .nr-dc-sub {
  font-size: 12px;
  color: rgba(51,65,74,0.7);
  margin-top: 4px;
}

/* ─────────────────────────────────────────
   Push opt-in card (nr-push-optin.js)
   完了画面に inject される「リマインダー ON」CTA
   ───────────────────────────────────────── */
.nr-push-optin {
  margin-top: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #FFF8EC, #ffffff);
  border: 1px solid var(--border, #e5dfd2);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(29,127,150, 0.15);
}
.nr-push-optin .nr-push-headline {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: rgba(51,65,74, 0.92);
  line-height: 1.4;
}
.nr-push-optin .nr-push-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(51,65,74,0.74);
  line-height: 1.5;
}
.nr-push-optin .nr-push-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nr-push-optin .nr-push-enable {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 9999px;
  background: linear-gradient(180deg, #8dc2cd 0%, #1d7f96 55%, #186f83 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nr-push-optin .nr-push-enable:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29,127,150, 0.35);
}
.nr-push-optin .nr-push-enable:disabled {
  opacity: 0.6;
  cursor: default;
}
.nr-push-optin .nr-push-dismiss {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong, #D8D3C8);
  border-radius: 9999px;
  background: transparent;
  color: rgba(51,65,74,0.74);
  font-size: 13px;
  cursor: pointer;
}
.nr-push-optin .nr-push-status {
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(51,65,74, 0.7);
  line-height: 1.5;
}
.nr-push-optin .nr-push-status.is-error {
  color: #B7472A;
}

/* ── マイルストーン解放演出 (Opal "宝石割り" 相当) ──
 * streak/XP の節目で全画面オーバーレイ。dim 背景 + 中央カード + shard 飛散。
 * DESIGN.md トークン: cream 背景 / gold アクセント / 影は最小限。
 * 制約: motion-reduce では shard を出さない。半透明背景は black ではなく cream の濃色。
 */
.nr-celebrate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.nr-celebrate.show {
  opacity: 1;
  pointer-events: auto;
}
.nr-celebrate-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(246,243,236, 0.96) 0%, rgba(232, 228, 220, 0.92) 60%, rgba(51,65,74, 0.45) 100%);
  backdrop-filter: blur(2px);
}
.nr-celebrate-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(51,65,74, 0.18);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  color: rgba(51,65,74, 0.7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.nr-celebrate-close:hover { background: #fff; color: #33414a; }
.nr-celebrate-card {
  position: relative;
  max-width: 380px;
  width: calc(100% - 48px);
  padding: 32px 24px 24px;
  background: #FFFDF8;
  border: 1px solid #e5dfd2;
  border-radius: 18px;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nr-celebrate.show .nr-celebrate-card { transform: scale(1); }
.nr-celebrate-gem {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nr-celebrate-gem-emoji {
  font-size: 64px;
  line-height: 1;
  display: inline-block;
  transform: scale(0.6);
  transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 12px rgba(29,127,150, 0.35));
}
.nr-celebrate.show .nr-celebrate-gem-emoji { transform: scale(1); }
.nr-celebrate.break .nr-celebrate-gem-emoji {
  animation: nr-celebrate-burst 0.42s cubic-bezier(0.4, 0, 0.6, 1) both;
}
@keyframes nr-celebrate-burst {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22) rotate(-6deg); filter: drop-shadow(0 0 18px rgba(29,127,150, 0.7)); }
  100% { transform: scale(1.08) rotate(0deg); filter: drop-shadow(0 4px 12px rgba(29,127,150, 0.35)); }
}
.nr-celebrate-shards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.nr-celebrate-shards i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 10px;
  margin: -5px 0 0 -3px;
  background: linear-gradient(180deg, #1d7f96 0%, #8dc2cd 100%);
  border-radius: 1.5px;
  opacity: 0;
  transform-origin: center;
}
.nr-celebrate.break .nr-celebrate-shards i {
  animation: nr-celebrate-shard 0.7s ease-out forwards;
}
.nr-celebrate-shards i:nth-child(1) { --tx:  60px; --ty: -42px; animation-delay: 0.02s; }
.nr-celebrate-shards i:nth-child(2) { --tx:  78px; --ty:  18px; animation-delay: 0.06s; background: linear-gradient(180deg, #E0581F, #1d7f96); }
.nr-celebrate-shards i:nth-child(3) { --tx:  44px; --ty:  64px; animation-delay: 0.04s; }
.nr-celebrate-shards i:nth-child(4) { --tx: -22px; --ty:  74px; animation-delay: 0.08s; background: linear-gradient(180deg, #C58110, #8dc2cd); }
.nr-celebrate-shards i:nth-child(5) { --tx: -68px; --ty:  36px; animation-delay: 0.03s; }
.nr-celebrate-shards i:nth-child(6) { --tx: -74px; --ty: -22px; animation-delay: 0.07s; background: linear-gradient(180deg, #E0581F, #1d7f96); }
.nr-celebrate-shards i:nth-child(7) { --tx: -28px; --ty: -68px; animation-delay: 0.05s; }
.nr-celebrate-shards i:nth-child(8) { --tx:  20px; --ty: -72px; animation-delay: 0.09s; background: linear-gradient(180deg, #C58110, #8dc2cd); }
@keyframes nr-celebrate-shard {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) rotate(120deg); }
}
.nr-celebrate-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #33414a;
  margin: 0 0 6px;
}
.nr-celebrate-sub {
  font-size: 13.5px;
  color: rgba(51,65,74,0.74);
  margin: 0 0 18px;
}
.nr-celebrate-cta-row { display: flex; justify-content: center; }
.nr-celebrate-cta {
  min-height: 44px;
  padding: 0 28px;
  border: 0;
  border-radius: 9999px;
  background: linear-gradient(180deg, #8dc2cd 0%, #1d7f96 55%, #186f83 100%);
  color: #33414a;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nr-celebrate-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29,127,150, 0.35);
}
.nr-celebrate-mute {
  display: inline-block;
  margin: 14px auto 0;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: rgba(51,65,74,0.7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 9999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nr-celebrate-mute:hover { color: rgba(51,65,74, 0.7); background: rgba(51,65,74, 0.04); }
@media (prefers-reduced-motion: reduce) {
  .nr-celebrate-card { transition: none; transform: none !important; }
  .nr-celebrate-gem-emoji { transition: none; transform: scale(1) !important; animation: none !important; }
  .nr-celebrate-shards i { display: none; }
}

/* ── 今日のメニュー ガイド実行バー (AI ジム Phase A) ──
   z-index はヘッダー規定 (site-header=300) 未満・ツール sticky CTA と同じ 199。 */
.nr-menu-run-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 199;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 8px 10px 8px 14px;
  background: #ffffff;
  border: 1px solid #e5dfd2;
  border-radius: 9999px;
  box-shadow: 0 6px 20px rgba(51,65,74, 0.12);
}
.nr-menu-run-bar .nr-mrb-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(51,65,74, 0.62);
  white-space: nowrap;
}
.nr-menu-run-bar .nr-mrb-label b { color: rgba(51,65,74, 0.88); }
.nr-menu-run-bar .nr-mrb-meter {
  margin-left: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(51,65,74, 0.42);
}
.nr-menu-run-bar .nr-mrb-next {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D9D4C9;
  border-radius: 9999px;
  background: transparent;
  color: rgba(51,65,74, 0.62);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.nr-menu-run-bar .nr-mrb-next.achieved {
  border: none;
  background: linear-gradient(135deg, #186f83, #1d7f96, #8dc2cd);
  color: #fff;
}
.nr-menu-run-bar .nr-mrb-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: rgba(51,65,74, 0.42);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}
.nr-menu-run-bar.pulse .nr-mrb-next.achieved {
  animation: nrMrbPulse 0.5s ease-out 1;
  box-shadow: 0 0 0 4px rgba(29,127,150, 0.25);
}
@keyframes nrMrbPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
@media (max-width: 480px) {
  .nr-menu-run-bar {
    left: 8px;
    right: 8px;
    transform: none;
    max-width: none;
    justify-content: space-between;
  }
  .nr-menu-run-bar .nr-mrb-label { font-size: 11.5px; }
}


/* ─────────────────────────────────────────
 * #12 PWA インストールバナー (2026-07-21 A4)
 * z-index 199: header (300) より下・sticky CTA 規定 (200 以下) 準拠。
 * bottom 88px: streak バナーと同じく、下端固定の menu-run-bar /
 * ツール sticky CTA (bottom 0〜12px) と重ならない位置に置く (配置メモ参照)
 * ───────────────────────────────────────── */
.nre-pwa-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 199;
  margin: 0 auto;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card, #FDFCF9);
  border: 1px solid var(--border-strong, #d9d4ca);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(26, 26, 26, 0.14);
  animation: nrePwaSlideUp 0.4s ease-out;
}
@keyframes nrePwaSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nre-pwa-banner__text {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-1, rgba(26, 26, 26, 0.88));
}
.nre-pwa-banner__install {
  flex-shrink: 0;
  min-height: 52px;
  padding: 8px 18px;
  border: none;
  border-radius: 9999px;
  background: var(--coral, #ef8577);
  box-shadow: 0 3px 0 var(--coral-dark, #d96c5e);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.nre-pwa-banner__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3, rgba(26, 26, 26, 0.42));
  font-size: 15px;
  cursor: pointer;
}

/* home continue: free /ai/ primary + last-tool secondary */
.nr-continue-cta--ai {
  display: flex; flex-direction: column; gap: 2px;
  margin: 14px 0 8px; padding: 14px 16px;
  background: #fff; border: 1px solid #e5dfd2; border-left: 3px solid #ef8577;
  border-radius: 14px; text-decoration: none; color: #33414a;
}
.nr-continue-cta--ai .nr-cc-label { font-size: 11px; font-weight: 800; color: #1d7f96; letter-spacing: .04em; }
.nr-continue-cta--ai .nr-cc-tool { font-size: 15px; font-weight: 900; }
.nr-continue-cta--ai .nr-cc-meta { font-size: 12px; color: #7b8790; }
.nr-continue-cta--tool {
  display: inline-flex; gap: 8px; align-items: baseline;
  margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #1d7f96; text-decoration: none;
}
.nr-continue-cta--tool .nr-cc-label { color: #7b8790; font-weight: 600; }
