/*
 * css/04b-modal-bottle.css
 *
 * Phase 1.7-η Step A (2026-05-25): bottle-modal 専用スタイル。
 * 主に js/modals/bottleModalPrice.js の updateModalPricePreview innerHTML 内
 * 49 個のインライン style を抽出して集約。
 *
 * 命名規則: .mpp-* prefix で Modal Price Preview を識別。
 *           衝突回避と「PM がレイアウト調整時にこのファイルだけ見れば良い」 状態を確立。
 *
 * 仕様: docs/HANDOFF_REPORT_20260525_v1.md 後続 Phase 1.7-η
 */

/* ============================================================
   1. モードタブ行 (ショット / ボトル / キープ + 連動 toggle)
   ============================================================ */
.mpp-mode-tabs-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* 連動 ON/OFF アイコントグル (Step B でタブ行右端に配置) */
.mpp-link-toggle {
  margin-left: auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.mpp-link-toggle.is-off {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.45);
}
.mpp-link-toggle:hover {
  background: rgba(245, 166, 35, 0.12);
}
.mpp-link-toggle.is-off:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   2. メインカード (推奨価格 / 調整価格 / 利益 / 倍率 / 設定価格)
   ============================================================ */
.mpp-card {
  background: var(--bg-surface);
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* AI 基準価格行 (推奨 + AI基準 + ¥X,XXX) */
.mpp-ai-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  line-height: 1.1;
}
.mpp-ai-pill {
  background: var(--amber-dim);
  color: var(--amber);
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}
.mpp-ai-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.mpp-ai-price {
  color: var(--amber);
  font-size: 1.4rem;
  font-weight: 900;
  margin-left: 10px;
}

/* 算出根拠 行 */
.mpp-formula {
  font-size: 0.85rem;
  color: var(--amber);
  margin-top: 8px;
  font-weight: 600;
}

/* セパレータは Step F follow-up (2026-05-25 PM 判断 A) で完全削除済。
   旧仕様の細い線は視認性が低く意味も薄いとの PM 指摘で撤廃。
   AI 推奨 → 算出根拠 → 巨大な現在価格 の視覚ヒエラルキーで十分に区切りが伝わる。 */

/* 現在価格ブロック (調整済み row + 巨大数字) */
.mpp-current-wrapper {
  margin-top: 8px;     /* 旧 separator の縦余白の一部を吸収 (上部に小さい breathing space) */
  margin-bottom: 10px;
}
/* Step F: 調整済みラベルと AI に戻すボタンを 3 列 grid で水平センター揃え
   (旧: position absolute で button が giant 数字に被る問題への対策) */
.mpp-adjusted-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 2px;
}
.mpp-adjusted-label {
  grid-column: 2;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 800;
  margin: 0;
}
.mpp-current-price {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.mpp-current-price.is-adjusted {
  color: var(--success);
}
.mpp-reset-btn {
  grid-column: 3;
  justify-self: end;
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* 利益 / 原価率 行 */
.mpp-profit-ai {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 700;
}
.mpp-profit-manual {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 800;
  margin-top: 4px;
}

/* 🛡 スライドルール下限 適用中 (pill)
   PM 指示 (2026-05-25): SE2 で「(¥1,000) 適用中」 が 2 段折り返しになる問題を解消。
   font-size を 0.85→0.78 に下げ、 white-space: nowrap で 1 行強制。
   5 桁価格 (¥99,999) でも SE2 のカード幅に収まる想定。 */
.mpp-floor-alert {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--amber);
  margin-top: 4px;
  padding: 2px 6px;
  display: inline-block;
  border-radius: 4px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  background: var(--overlay-amber);
  white-space: nowrap;
}

/* [アラート二層化 2026-06-06] AI推奨下限割れの目立つ常時バナー (小さいガイドの見落とし対策) */
.mpp-safety-banner {
  background: var(--danger-dim);
  color: var(--danger);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--danger);
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.4;
}
.mpp-safety-banner__sub {
  font-size: 0.8rem;
  font-weight: 700;
}
/* [安全網見直し 2026-06-08] 黄(ソフト)バナー: 下限は割っていないが最低利益率(安全網)を
   下回る状態。赤(下限割れ)ではないので、再考を促す注意色(amber)で表現。固定化せず上書き可。 */
.mpp-safety-banner--soft {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: var(--amber);
}
/* [安全網見直し Step4 2026-06-08] 安全網がAI推奨を引き上げたことの可視化(情報・非警告)。
   バナーより控えめな注記。固定化を「黙って」やらず気づかせる。 */
.mpp-safetynet-info {
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.35;
}

/* コントロールセクション (倍率調整 + 設定価格) */
.mpp-controls {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mpp-control-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 2px;   /* Step F: 4px → 2px (PM 指摘で更に詰める) */
}
.mpp-control-label--strong {
  color: var(--text-primary);
  font-weight: 800;
  margin-bottom: 1px;   /* Step F: 3px → 1px (設定価格 label、 PM 指摘) */
}
.mpp-control-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ステッパーボタン (倍率: 38px、 設定価格: 42px) */
.mpp-step-btn {
  background: var(--bg-main);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
}
.mpp-step-btn--large {
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  color: var(--text-primary);
}

/* 倍率の中央値 (Step E で PM 指示により元に戻した) */
.mpp-multiplier-value {
  margin: 0 16px;      /* Step C 試行 (8px) → Step E で元に戻した (PM: 詰めなくて良い) */
  min-width: 92px;     /* Step C 試行 (60px) → Step E で元に戻した */
  text-align: center;
  font-weight: 900;
  font-size: 1.05rem;
}

/* 設定価格のヒント文言 */
.mpp-price-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 16px;
}

/* ============================================================
   3. ロジックボックス (合理ゾーン、 ショット vs ボトル/キープ)
   ============================================================ */
.mpp-logic-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  text-align: left;
}
.mpp-logic-box--shot {
  background: rgba(92, 156, 230, 0.10);
  border-left: 3px solid #5C9CE6;
}
.mpp-logic-box--bottle-keep {
  background: rgba(245, 166, 35, 0.12);
  border-left: 3px solid var(--amber);
}
.mpp-logic-title {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.mpp-logic-title--shot {
  color: #7fb7ff;
}
.mpp-logic-title--bottle-keep {
  color: var(--amber);
}
.mpp-logic-body {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.65;
}
.mpp-logic-inner {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.65;
}
.mpp-logic-inner--small {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.mpp-logic-mode-label {
  color: #7fb7ff;
}
.mpp-logic-cap-value {
  color: var(--amber);
  font-weight: 800;
}
.mpp-logic-hint {
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.mpp-logic-footer {
  margin-top: 6px;
  /* [2026-05-28 PM 要望] 説明文として読ませる必要があるため 0.75 → 0.85rem (sm tier) */
  font-size: 0.85rem;
  /* [2026-05-28 PM 要望] body と同じ色 (= text-primary) に統一 */
  color: var(--text-primary);
  line-height: 1.5;
}

/* 位置インジケータ (✓ ゾーン内 / ⚠ ゾーン外) */
.mpp-position-ok {
  color: var(--success);
  font-weight: 800;
}
.mpp-position-warn {
  color: var(--danger);
  font-weight: 800;
}

/* ============================================================
   4. スライドルール詳細ボックス (📐 適用スライドルール)
   ============================================================ */
.mpp-slide-rule-box {
  margin-top: 14px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}
.mpp-slide-rule-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 4px;
}
.mpp-slide-rule-body {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.mpp-slide-rule-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================================
   5. アドバイスボックス (AI Strategic Advice)
   ============================================================ */
.mpp-advice-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--accent);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mpp-advice-box.is-danger {
  background: rgba(255, 82, 82, 0.12);
  border-left-color: var(--danger);
}
.mpp-advice-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mpp-advice-body {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.65;
}

/* ============================================================
   6. エラーフォールバック / 未入力プレースホルダ
   ============================================================ */
.mpp-error-fallback {
  color: var(--danger);
  padding: 10px;
  text-align: center;
}
.mpp-empty-placeholder {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px dashed var(--border-strong);
}

/* ============================================================
   7. 問屋価格カード (Step D で adoption)
   ============================================================ */
.modal-vendor-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px 0;   /* Step D: 上下に余白を確保、 動的揺れ吸収 */
}
.modal-vendor-badge {
  padding: 3px 8px;
  border: 1px solid #666;
  color: #eee;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  background: var(--border-strong);
}
.modal-vendor-badge.is-min {
  border-color: var(--danger);
  color: var(--danger);
}

/* ============================================================
   8. ボトル画像 拡大表示 (2026-05-28)
   - スマホ/デスクトップ共通: 右下の 🔍 ボタンタップで lightbox 全画面拡大
   - デスクトップのみ: 画像 hover で軽量フローティングプレビュー
   ============================================================ */

/* 拡大ボタン: 「写真」 ラベル右隣に配置、 アイコン単体 (枠なし) (2026-05-28 PM 再調整) */
.modal-thumb-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.15s;
}
.modal-thumb-zoom-btn:hover,
.modal-thumb-zoom-btn:focus {
  color: var(--text-primary, #fff);
  outline: none;
}

/* lightbox 全画面拡大 (両プラットフォーム共通) */
.image-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 20px;
  box-sizing: border-box;
}
/* .modal-hidden (= 04-modal.css の display:none) は同詳細度かつ先読みのため、
   04b 内で複合セレクタ (0,2,0) で勝たせる。 これが無いと lightbox を閉じられない */
.image-zoom-overlay.modal-hidden {
  display: none;
}
/* 画像 + × ボタンを包む frame: 画像と同じサイズに縮むことで × を画像基準で配置可能に */
.image-zoom-frame {
  position: relative;
  display: block;          /* inline-flex から変更(2026-06-14): track の幅計算干渉を除去 */
  max-width: 92vw;
  max-height: 92vh;
}
.image-zoom-img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}
/* × ボタン: 画像のすぐ右上に配置 (画像内側右上に少し被せる) */
.image-zoom-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.image-zoom-close:hover,
.image-zoom-close:focus {
  background: #fff;
  outline: none;
}

/* ============================================================
   容量違い画像スワイプ (A案 2026-06-14, 司令塔手順書)
   複数容量時のみ overlay に .is-gallery を付与してトラック表示に切替。
   1枚時は #image-zoom-img 単体(従来動作)のまま。
   ============================================================ */
/* 旧カルーセル(track/slide)は廃止し、単一 #image-zoom-img の src 差替方式に変更(2026-06-14)。
   track は常時非表示。#image-zoom-img はギャラリーでもそのまま表示(既存 .image-zoom-img スタイル) */
.image-zoom-track { display: none !important; }
/* nav/dots/badge は overlay(position:fixed) 基準で最前面に固定 (frame/track のスタッキングに埋もれない)。
   画像は縦中央配置のため、上端/下端から ~18vh で画像のすぐ上・下に来る (PM要望 2026-06-14) */
.image-zoom-badge {
  position: absolute;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  background: var(--overlay-strong, rgba(0, 0, 0, 0.6));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  pointer-events: none;
  z-index: 10;
  /* [複数画像 キャプション 2026-07-02] 「旧ボトル 1980年代」等の長文でも崩れないよう折返し＋中央寄せ＋最大幅。短い容量表記は従来どおり小ピル。 */
  max-width: 80vw;
  text-align: center;
  white-space: normal;
  line-height: 1.3;
}
/* [複数画像 Phase3 Option2 2026-07-02] この端末のサムネ設定⭐(辞書複数画像時のみ表示)。右上・タップで実効メイン切替。 */
.image-zoom-star {
  position: absolute;
  top: 14vh;
  right: 16px;
  z-index: 11;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--overlay-strong, rgba(0, 0, 0, 0.6));
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.image-zoom-star.is-main { color: var(--amber, #FBBF24); }
.image-zoom-star:active { transform: scale(0.92); }
.image-zoom-dots {
  position: absolute;
  bottom: 18vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.image-zoom-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}
.image-zoom-dot.active { background: #fff; }
.image-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  /* PM指定(2026-06-14): 黒丸 不透明度25% + 白矢印。白背景画像でも矢印が沈まないよう影付与 */
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
/* 画像のすぐ左右(白フレーム内側)に寄せる */
.image-zoom-prev { left: 5vw; }
.image-zoom-next { right: 5vw; }

/* ギャラリー時(複数容量)のみ: 容量バッジ(上)→画像→ドット(下) を縦に積み重ね、
   バッジ/ドットを画像の外に出す (画像に被らない。PM要望 2026-06-15)。
   左右の矢印(nav)は absolute のままサイドに残す。単一画像ズームは従来の92vhを維持。 */
.image-zoom-overlay.is-gallery {
  flex-direction: column;
  gap: 12px;
}
.image-zoom-overlay.is-gallery .image-zoom-frame,
.image-zoom-overlay.is-gallery .image-zoom-img {
  max-height: 78vh;
}
.image-zoom-overlay.is-gallery .image-zoom-badge {
  position: static;
  order: -1;
  top: auto;
  transform: none;
}
.image-zoom-overlay.is-gallery .image-zoom-dots {
  position: static;
  order: 2;
  bottom: auto;
  transform: none;
}

/* ============================================================
   9. ヘッダー + 店舗スロット (2026-05-28 インライン CSS 第 2-1b)
   optimizeBottleModalLayout 内 inline style 8 件を分離。
   bulk action modal が同じ .modal-header を使うため #bottle-modal で限定。
   ============================================================ */
#bottle-modal .modal-header {
  gap: 8px;
}
#modal-title {
  margin: 0;
}
#modal-header-store-slot {
  /* [2026-05-28 PM 要望] 横幅を狭く + 10 文字超は text-overflow:ellipsis で「...」 表示
     #field-store-name に既存 white-space:nowrap + overflow:hidden + text-overflow:ellipsis あり */
  min-width: 110px;
  max-width: 170px;
  margin-left: auto;
}
#modal-header-store-slot .form-group {
  margin: 0;
}
#field-store-name {
  height: 34px;
  padding: 4px 10px;
  /* padding-left は 04-modal.css の !important で 12px 維持 */
  /* [2026-05-28 第 2-3] fontSize 追加 */
  font-size: 0.85rem;
  /* [2026-05-28 PM 要望] 10 文字超は「...」 で省略 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   10. Row 1 (写真エリア + 基本情報) (2026-05-28 インライン CSS 第 2-1c + 2-2)
   optimizeBottleModalLayout 内 6 件 + display 2 件を分離。
   ============================================================ */
#modal-row-1 {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: start;
  margin: 8px 0 12px;
}
#modal-row-1-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   11. 写真ゾーン imageZone (2026-05-28 インライン CSS 第 2-1d)
   optimizeBottleModalLayout 内 8 件を分離。 position / display は別段階送り。
   ★魔法2: 枠の内側の「見えない余白」 を完全に殺す + 3/4 比率で表示
   ============================================================ */
#modal-image-zone {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  /* [2026-05-28 PM 指摘] 写真ラベルの下マージン (2px = ★魔法1) と 銘柄名ラベルの
     下マージン (6px) の差 4px を margin-top で補い、 画像エリアと銘柄名入力欄の
     上端を水平に揃える */
  margin: 4px 0 0 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px;
}
/* 画像あり時のみ点線枠を隠す (2026-05-28 PM 要望)。
   .modal-image-zone の既存 border: 2px dashed (04-modal.css §433) を border: none で
   完全に消し、 border 幅分のスペースも排除して画像上端を銘柄名入力欄と完全揃え。
   has-image クラスは setModalThumb で src あり時に付与される */
#modal-image-zone.has-image {
  border: none;
}
/* 画像あり時のホバー時 box-shadow (= 既存 .modal-image-zone:hover の amber glow) も抑止 */
#modal-image-zone.has-image:hover {
  box-shadow: none;
}
/* thumb と placeholder は image-zone 内で重ねて配置 (2026-05-28 第 2-5) */
#modal-thumb {
  position: absolute;
  top: 0;
  left: 0;
}
#modal-thumb-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* ============================================================
   12. row1Right (銘柄名 + カテゴリ) + imageGroup/Label (2026-05-28 第 2-1e)
   optimizeBottleModalLayout 内 8 件を分離。
   ★魔法1: 写真ラベルの上 6px / 下 2px で右の銘柄名ラベルと水平揃え
   ============================================================ */
#modal-row-1-left .form-group {
  margin: 0;
  /* [2026-05-28 PM 指摘] 写真側全体 (ラベル + 画像) が銘柄名側より数 px 上にズレる現象を解消。
     ★魔法1 の line-height 計算と実機表示の差分を padding-top で補正 */
  padding-top: 2px;
}
#modal-row-1-left .form-label {
  margin: 6px 0 2px 0;
  /* [2026-05-28 第 2-3] 写真ラベル装飾 */
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}
#modal-row-1-right > .form-group {
  margin: 0;
}
#modal-row-1-right > .form-group .form-label {
  margin: 0 0 6px 0;
  /* [2026-05-28 第 2-3] 銘柄名ラベル lineHeight */
  line-height: 1.2;
}
#modal-category-drilldown {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

/* ============================================================
   13. Row 2 (rarity + memo) (2026-05-28 インライン CSS 第 2-1f)
   optimizeBottleModalLayout 内 9 件を分離。 display は 2-2 段階送り。
   ============================================================ */
#modal-row-2 {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 0 12px;
}
#modal-row-2-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#modal-row-2-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
}

/* ============================================================
   14. Row 3 + Row 4 (価格 + 容量 + 提供量 + 杯数) (2026-05-28 第 2-1g)
   optimizeBottleModalLayout 内 4 件を分離。 display は 2-2 段階送り。
   5 groups (cost/prevCost/volume/shot/pour) は既存 .modal-form-cell { margin: 0 } で
   既にカバーされるため CSS 追加不要。
   ============================================================ */
#modal-row-3,
#modal-row-4 {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

/* ============================================================
   15. 装飾系: placeholder テキスト + stepper 数値フォント (2026-05-28 第 2-3)
   icon は .modal-thumb-placeholder-icon (04-modal.css 戦略 X で統合済)
   ============================================================ */
#modal-thumb-placeholder > span:last-child {
  display: block;
  text-align: center;
  line-height: 1.3;
  font-size: 0.8rem;
  color: #5C9CE6;
  font-weight: 700;
}
.modal-stepper-input {
  font-family: var(--font-numeric, "Inter", sans-serif);
}

/* ============================================================
   16. 雑多 (第 2-雑多 = 第 2-1 段階の取りこぼし、 2026-05-28)
   ============================================================ */
#modal-title {
  flex: 1 1 auto;
}
#modal-header-store-slot {
  flex: 0 0 58%;
}
#modal-thumb {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  border-radius: inherit;
}
#modal-thumb-placeholder {
  width: 100%;
}
#modal-thumb-placeholder > span:last-child {
  /* §15 既存 display/text-align/line-height/font-size/color/font-weight に追加 */
  margin: 0;
  padding: 0 10px;
}
#modal-category-drilldown .custom-select-wrapper {
  overflow: hidden;
}
#modal-row-1-subinfo .form-group {
  margin: 0;
  flex: 0 0 auto;
}
#modal-row-1-subinfo .custom-select-trigger {
  width: auto;
  min-width: 76px;
  box-sizing: border-box;
  /* [2026-05-28 PM 要望] 左列ボタン (42px) と水平揃え */
  height: 42px;
}

/* ============================================================
   17. cssText 一括 分離 (2026-05-28 インライン CSS 第 2-4 = 最終段階)
   subInfoLine / bigSearchBtn / pasteBtn / quickSaveBtn の cssText を CSS 化
   ============================================================ */
#modal-row-1-subinfo {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}
#btn-web-search-big {
  /* [2026-05-28 PM 要望] 左列ボタン (42px) と水平揃え用に 40 → 42px */
  height: 42px;
  padding: 0 16px;
  background: rgba(92, 156, 230, 0.1);
  border: 1px solid rgba(92, 156, 230, 0.4);
  border-radius: 6px;
  color: #5C9CE6;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}
#btn-mobile-paste {
  width: 100%;
  height: 42px;
  background: rgba(92, 156, 230, 0.15);
  border: 1px solid rgba(92, 156, 230, 0.4);
  color: #5C9CE6;
  border-radius: 8px;
  /* font-size 16px は iOS Safari のフォーカス時自動ズーム回避のため必須 (16px 未満で発動) */
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  caret-color: transparent;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}
#btn-quick-save-modal {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #141821;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
}

