/* ============================================================
 * mobileApp.css — モバイル簡易 UI (v1.21.0、master 2026-09-03)
 * デザイン正本: docs/design/TORIAI Mobile 1b.html (Claude Design「TORIAI Mobile 1b」)
 *
 * 規約 (旧 mobile.css §5.3 地雷マップ準拠):
 *  - index.html で【全 CSS の最後】(mobile.css より後) に読み込む。
 *  - 全規則を @media (max-width:768px) + body.mobile-app で二重スコープし、
 *    デスクトップには 1px も影響させない。
 *  - デスクトップ DOM は display:none で隠すだけ (削除しない。global state は生きたまま)。
 *  - 既存モーダル (usageGuide 10000 / shareLogin 1000 / changelog / cart 9100) より下の
 *    z-index 300 に置く = モーダル群は今までどおり上に出る。
 * ============================================================ */

#mobApp { display: none; }

@media print {
  #mobApp { display: none !important; }
}

@media (max-width: 768px) {
  body.mobile-app {
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }
  /* デスクトップ UI を隠す (ヘッダー / 各ページ / 旧モバイルシェル / 設定 FAB) */
  body.mobile-app > header,
  body.mobile-app > #ddOverlay,
  body.mobile-app > .pg,
  body.mobile-app > .hi-panel,
  body.mobile-app > .contact-page,
  body.mobile-app > .layout,
  body.mobile-app > #dtLayout,
  body.mobile-app > .app-copyright,
  body.mobile-app > .mob-tabbar,
  body.mobile-app > #mobSheetBackdrop,
  body.mobile-app .csp-fab,
  body.mobile-app #mobResultsPill,
  body.mobile-app .mob-results-bar,
  body.mobile-app #calcSettingsPanel {
    display: none !important;
  }

  body.mobile-app #mobApp {
    display: flex;
  }

  /* ── ルート ─────────────────────────────────────── */
  body.mobile-app .ma {
    --ma-ink: #15242B;
    --ma-mute: #5B6B73;
    --ma-faint: #93A2AB;
    --ma-line: #E1E8EE;
    --ma-sf: #F2F6FA;
    --ma-sf2: #EEF3F7;
    --ma-sf3: #E8EEF3;
    --ma-green: #00A67E;
    --ma-green-d: #00795C;
    --ma-green-l: #E3F5EF;
    --ma-orange: #E0731D;
    position: fixed;
    inset: 0;
    z-index: 300;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    color: var(--ma-ink);
    font-family: 'Murecho', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
  }
  body.mobile-app .ma *,
  body.mobile-app .ma *::before,
  body.mobile-app .ma *::after { box-sizing: border-box; }
  /* button リセットは :where() で詳細度を (0,2,0) に抑え、後続のコンポーネント規則が勝つようにする */
  body.mobile-app .ma :where(button) {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    color: inherit;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  body.mobile-app .ma :where(button):active { opacity: .75; }
  body.mobile-app .ma :where(button):disabled { cursor: default; }
  body.mobile-app .ma .ma-label { font-size: 11px; color: var(--ma-mute); font-weight: 500; }
  body.mobile-app .ma .ma-mute { color: var(--ma-mute); }
  body.mobile-app .ma .ma-faint { color: var(--ma-faint); }
  body.mobile-app .ma .ma-hint { font-size: 13px; color: var(--ma-faint); min-height: 40px; display: flex; align-items: center; }
  body.mobile-app .ma .ma-note { font-size: 12px; color: var(--ma-mute); line-height: 1.6; }
  body.mobile-app .ma .ma-link { color: var(--ma-mute); font-weight: 700; font-size: 12px; padding: 6px 0; }
  body.mobile-app .ma .ma-link-center { text-align: center; width: 100%; min-height: 44px; font-size: 14px; display: flex; align-items: center; justify-content: center; }

  /* ── 上部: TORIAI + メニュー + タブ ───────────────── */
  body.mobile-app .ma-top {
    flex: none;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  body.mobile-app .ma-top-row { display: flex; align-items: center; justify-content: space-between; }
  body.mobile-app .ma-brand {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .16em;
    color: var(--ma-ink);
    padding: 6px 4px 6px 2px;
    min-height: 40px;
  }
  body.mobile-app .ma-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--ma-green);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex: none;
  }
  body.mobile-app .ma-tabs {
    display: flex;
    background: var(--ma-sf2);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
  }
  body.mobile-app .ma-tab {
    flex: 1;
    height: 40px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ma-mute);
    position: relative;
  }
  body.mobile-app .ma-tab.on { background: #fff; color: var(--ma-ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
  body.mobile-app .ma-tab-badge {
    position: absolute; top: 4px; right: 8px;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    background: var(--ma-orange);
    color: #fff;
    font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
  }

  /* ── 本体 ───────────────────────────────────────── */
  body.mobile-app .ma-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  body.mobile-app .ma-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  body.mobile-app .ma-scroll-data,
  body.mobile-app .ma-scroll-hist { gap: 8px; padding-bottom: 24px; }
  /* 縦 flex の子は縮めない (overflow-x:auto の鋼種チップ行が 0 高さに潰れるのを防ぐ) */
  body.mobile-app .ma-scroll > * { flex: none; }
  body.mobile-app .ma-input {
    flex: none;
    padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
  }
  body.mobile-app .ma-input-data { padding-top: 6px; border-top: 1px solid var(--ma-sf2); }

  /* 鋼材カード */
  body.mobile-app .ma-steel {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--ma-sf);
    border-radius: 14px;
    padding: 12px 16px;
    min-height: 44px;
    width: 100%;
    gap: 8px;
  }
  body.mobile-app .ma-steel-main { min-width: 0; }
  body.mobile-app .ma-steel-name { font-weight: 900; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.mobile-app .ma-steel-sub { font-size: 12px; font-weight: 500; color: var(--ma-mute); }
  body.mobile-app .ma-chev { color: var(--ma-faint); font-size: 18px; flex: none; }

  /* 部材チップ */
  body.mobile-app .ma-parts { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
  body.mobile-app .ma-part {
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px 0 10px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid var(--ma-line);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  body.mobile-app .ma-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  body.mobile-app .ma-part-qty { color: var(--ma-mute); font-weight: 500; }
  body.mobile-app .ma-part-x { color: #B9C4CB; font-size: 14px; }
  body.mobile-app .ma-parts-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ma-faint); padding: 0 2px; }

  /* 入力欄 + テンキー */
  body.mobile-app .ma-drafts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  body.mobile-app .ma-draft {
    border-radius: 16px;
    padding: 10px 14px;
    background: var(--ma-sf);
    border: 2px solid transparent;
    min-height: 64px;
    width: 100%;
  }
  body.mobile-app .ma-draft.on { background: var(--ma-green-l); border-color: var(--ma-green); }
  body.mobile-app .ma-draft-val { font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
  body.mobile-app .ma-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 56px;
    gap: 8px;
  }
  body.mobile-app .ma-key {
    height: 100%;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
    user-select: none;
    -webkit-user-select: none;
  }
  body.mobile-app .ma-key-num { background: var(--ma-sf); color: var(--ma-ink); font-size: 24px; }
  body.mobile-app .ma-key-fn { background: var(--ma-sf3); color: var(--ma-mute); font-size: 15px; }
  body.mobile-app .ma-key-add { background: var(--ma-green); color: #fff; font-size: 16px; }
  body.mobile-app .ma-key-tall { grid-row: span 2; }

  /* 主ボタン / 副ボタン */
  body.mobile-app .ma-run {
    width: 100%;
    min-height: 60px;
    border-radius: 18px;
    background: var(--ma-green);
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 8px 20px rgba(0,166,126,.28);
    text-decoration: none;
    text-align: center;
  }
  body.mobile-app .ma-run.is-off { background: #B9C4CB; box-shadow: none; }
  body.mobile-app .ma-run-sub { font-weight: 500; font-size: 14px; opacity: .85; }
  body.mobile-app .ma-run-icon { font-size: 18px; font-weight: 500; }
  body.mobile-app .ma-run-a { min-height: 54px; font-size: 15px; font-weight: 700; border-radius: 16px; box-shadow: none; }
  body.mobile-app .ma-secondary {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    background: var(--ma-sf);
    color: var(--ma-ink);
    font-weight: 700;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
  }
  body.mobile-app .ma-secondary.is-off { color: var(--ma-faint); }
  body.mobile-app .ma-secondary.is-done { background: var(--ma-green-l); color: var(--ma-green-d); }

  /* 重量 */
  body.mobile-app .ma-wtotal { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 2px; }
  body.mobile-app .ma-wtotal-label { font-size: 13px; color: var(--ma-mute); }
  body.mobile-app .ma-wtotal-val { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; }
  body.mobile-app .ma-unit { font-size: 13px; font-weight: 500; }
  body.mobile-app .ma-wlist { display: flex; flex-direction: column; }
  body.mobile-app .ma-wrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--ma-sf2); }
  body.mobile-app .ma-wrow-main { flex: 1; min-width: 0; }
  body.mobile-app .ma-wrow-name { font-weight: 700; font-size: 15px; }
  body.mobile-app .ma-wrow-kind { font-size: 12px; font-weight: 500; color: var(--ma-mute); }
  body.mobile-app .ma-wrow-sub { font-size: 12px; color: var(--ma-mute); }
  body.mobile-app .ma-wrow-kg { font-weight: 900; font-size: 17px; white-space: nowrap; }
  body.mobile-app .ma-wrow-x { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--ma-faint); font-size: 20px; flex: none; }

  /* データ (鋼材を選ぶ) */
  body.mobile-app .ma-section-title { font-size: 12px; color: var(--ma-mute); font-weight: 700; padding: 4px 2px; }
  body.mobile-app .ma-section-title-gap { padding-top: 12px; }
  body.mobile-app .ma-kinds { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  body.mobile-app .ma-kinds::-webkit-scrollbar { display: none; }
  body.mobile-app .ma-kind {
    flex: none;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid var(--ma-line);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
  }
  body.mobile-app .ma-kind.on { background: var(--ma-green); border-color: var(--ma-green); color: #fff; }
  body.mobile-app .ma-search input {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: 1.5px solid var(--ma-line);
    background: #fff;
    padding: 0 14px;
    font-size: 16px; /* iOS 拡大防止 */
    font-family: inherit;
    color: var(--ma-ink);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }
  body.mobile-app .ma-search input:focus { border-color: var(--ma-green); }
  body.mobile-app .ma-spec-list { display: flex; flex-direction: column; gap: 8px; }
  body.mobile-app .ma-spec {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid var(--ma-line);
    min-height: 44px;
    width: 100%;
  }
  body.mobile-app .ma-spec.on { background: var(--ma-green); border-color: var(--ma-green); color: #fff; }
  body.mobile-app .ma-spec-name { flex: 1; font-weight: 700; font-size: 15px; min-width: 0; }
  body.mobile-app .ma-spec-tag { font-size: 10px; font-weight: 700; opacity: .7; margin-left: 6px; }
  body.mobile-app .ma-spec-kgm { font-weight: 700; font-size: 14px; white-space: nowrap; }
  body.mobile-app .ma-stocks { display: flex; flex-wrap: wrap; gap: 8px; }
  body.mobile-app .ma-stock {
    height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    display: flex; align-items: center; gap: 6px;
    font-weight: 900;
    font-size: 17px;
    background: #fff;
    color: var(--ma-faint);
    border: 1.5px solid var(--ma-line);
  }
  body.mobile-app .ma-stock.on { background: var(--ma-green-l); color: var(--ma-green-d); border-color: var(--ma-green); }
  body.mobile-app .ma-stock-state { font-size: 11px; font-weight: 500; opacity: .8; }
  /* 取り合いタブの定尺チップ (compact、横スクロール) */
  body.mobile-app .ma-stocks-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
  body.mobile-app .ma-stocks-lbl { font-size: 11px; color: var(--ma-mute); font-weight: 700; flex: none; }
  body.mobile-app .ma-stocks-inline { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
  body.mobile-app .ma-stocks-inline::-webkit-scrollbar { display: none; }
  body.mobile-app .ma-stocks-inline .ma-stock { flex: none; height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
  body.mobile-app .ma-cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
  body.mobile-app .ma-card { background: var(--ma-sf); border-radius: 14px; padding: 12px 14px; min-width: 0; }
  body.mobile-app .ma-card-val { font-weight: 700; font-size: 14px; margin-top: 2px; word-break: break-word; }
  body.mobile-app .ma-card-wide { grid-column: 1 / -1; }
  body.mobile-app .ma .ma-num {
    width: 100%;
    height: 40px;
    margin-top: 4px;
    border-radius: 10px;
    border: 1.5px solid var(--ma-line);
    background: #fff;
    color: var(--ma-ink);
    font-family: inherit;
    font-size: 16px; /* iOS 拡大防止 */
    font-weight: 700;
    text-align: center;
    padding: 0 8px;
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: textfield;
  }
  body.mobile-app .ma .ma-num:focus { outline: none; border-color: var(--ma-green); }
  body.mobile-app .ma .ma-num::-webkit-outer-spin-button,
  body.mobile-app .ma .ma-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  body.mobile-app .ma-num2 { display: flex; align-items: center; gap: 8px; }
  body.mobile-app .ma-num2 span { color: var(--ma-faint); font-weight: 700; margin-top: 4px; }

  /* 履歴 */
  body.mobile-app .ma-hist-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px; font-size: 12px; color: var(--ma-mute); font-weight: 700; }
  body.mobile-app .ma-empty { padding: 40px 20px; text-align: center; color: var(--ma-faint); font-size: 14px; line-height: 1.6; }
  body.mobile-app .ma-empty span { font-size: 12px; }
  body.mobile-app .ma-hcard {
    background: #fff;
    border: 1.5px solid var(--ma-line);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 10px;
  }
  body.mobile-app .ma-hcard-head { display: flex; align-items: center; gap: 10px; }
  body.mobile-app .ma-hcard-main { flex: 1; min-width: 0; }
  body.mobile-app .ma-hcard-title { font-weight: 900; font-size: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
  body.mobile-app .ma-htag { font-size: 10px; font-weight: 700; background: var(--ma-sf3); color: var(--ma-mute); border-radius: 6px; padding: 1px 6px; }
  body.mobile-app .ma-hshared { font-size: 11px; font-weight: 700; color: #3730a3; background: #e0e7ff; border: 1px solid #c7d2fe; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
  body.mobile-app .ma-hcard-sub { font-size: 12px; color: var(--ma-mute); margin-top: 2px; }
  body.mobile-app .ma-hcard-right { text-align: right; flex: none; }
  body.mobile-app .ma-hcard-yield { font-size: 20px; font-weight: 900; color: var(--ma-green-d); line-height: 1; }
  body.mobile-app .ma-hcard-yield span { font-size: 11px; }
  body.mobile-app .ma-hcard-stocks { font-size: 11px; color: var(--ma-mute); }
  body.mobile-app .ma-strip { display: flex; height: 22px; border-radius: 7px; overflow: hidden; background: #EDF1F5; gap: 1px; }
  body.mobile-app .ma-strip > div { min-width: 1px; }
  body.mobile-app .ma-hcard-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
  body.mobile-app .ma-hbtn {
    height: 44px;
    border-radius: 12px;
    background: var(--ma-sf);
    color: var(--ma-ink);
    font-weight: 700;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
  }
  body.mobile-app .ma-hbtn-open { background: var(--ma-green-l); color: var(--ma-green-d); }
  body.mobile-app .ma-hbtn-open:disabled { background: var(--ma-sf); color: var(--ma-faint); }
  body.mobile-app .ma-hbtn-x { width: 44px; background: transparent; color: var(--ma-faint); font-size: 20px; }

  /* ── 覆い + シート ────────────────────────────────── */
  body.mobile-app .ma-dim {
    position: absolute; inset: 0;
    background: rgba(21,36,43,.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    z-index: 3;
  }
  body.mobile-app .ma-dim.is-on { opacity: 1; pointer-events: auto; }
  body.mobile-app .ma-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    max-height: 88%;
    background: #fff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,.15);
    transform: translateY(110%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
    display: flex; flex-direction: column;
    overflow: hidden;
    z-index: 4;
  }
  body.mobile-app .ma-sheet.is-open { transform: translateY(0); }
  body.mobile-app .ma-sheet-share,
  body.mobile-app .ma-sheet-menu { background: var(--ma-sf); max-height: 92%; }
  body.mobile-app .ma-grip { width: 40px; height: 5px; border-radius: 3px; background: #D5DEE6; margin: 10px auto 4px; flex: none; }
  body.mobile-app .ma-sheet-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
    display: flex; flex-direction: column; gap: 12px;
  }
  /* 縦 flex の子は縮めない (候補チップ行 overflow-x:auto が内容が長いと 0 高さに潰れ、選べなくなっていた = master 報告 2026-09-03) */
  body.mobile-app .ma-sheet-body > * { flex: none; }
  /* 結果シート */
  body.mobile-app .ma-res-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
  body.mobile-app .ma-res-yield { font-size: 44px; font-weight: 900; line-height: 1; color: var(--ma-green-d); }
  body.mobile-app .ma-res-yield span { font-size: 18px; }
  body.mobile-app .ma-res-right { text-align: right; }
  body.mobile-app .ma-res-stock { font-size: 17px; }
  body.mobile-app .ma-res-stock b { font-weight: 900; font-size: 24px; }
  body.mobile-app .ma-res-waste { font-size: 12px; color: var(--ma-orange); font-weight: 700; }
  /* 取り合いパターン候補 (横スクロールのチップ、選択中は緑) */
  body.mobile-app .ma-cands-title { font-size: 12px; color: var(--ma-mute); font-weight: 700; }
  body.mobile-app .ma-cands { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin: -6px 0 0; scrollbar-width: none; }
  body.mobile-app .ma-cands::-webkit-scrollbar { display: none; }
  body.mobile-app .ma-cand {
    flex: none;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    min-height: 52px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid var(--ma-line);
    max-width: 78vw;
  }
  body.mobile-app .ma-cand.on { background: var(--ma-green-l); border-color: var(--ma-green); }
  body.mobile-app .ma-cand-yield { font-weight: 900; font-size: 17px; color: var(--ma-green-d); line-height: 1; }
  body.mobile-app .ma-cand-desc { font-size: 11px; color: var(--ma-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  body.mobile-app .ma-patterns { display: flex; flex-direction: column; gap: 8px; }
  body.mobile-app .ma-pattern { display: flex; flex-direction: column; gap: 6px; }
  body.mobile-app .ma-pattern-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ma-mute); }
  body.mobile-app .ma-pattern-head b { color: var(--ma-ink); }
  /* 数値表示 (v1.21.4): 長さ×本 を + で連結 */
  body.mobile-app .ma-pattern-num { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
  body.mobile-app .ma-pg { display: inline-flex; align-items: center; gap: 6px; background: var(--ma-sf); border-radius: 10px; padding: 6px 10px; }
  body.mobile-app .ma-pg-qty { color: var(--ma-mute); font-weight: 500; font-size: 13px; }
  body.mobile-app .ma-pg-plus { color: var(--ma-faint); font-weight: 500; }
  /* 共有シート / メニュー */
  body.mobile-app .ma-share-head { display: flex; align-items: center; justify-content: space-between; }
  body.mobile-app .ma-share-title { font-weight: 900; font-size: 20px; }
  body.mobile-app .ma-ver { font-size: 12px; font-weight: 500; color: var(--ma-mute); margin-left: 6px; }
  body.mobile-app .ma-close { width: 36px; height: 36px; border-radius: 50%; background: var(--ma-sf3); display: flex; align-items: center; justify-content: center; color: var(--ma-mute); font-size: 18px; }
  body.mobile-app .ma-share-text {
    width: 100%;
    min-height: 220px;
    border-radius: 16px;
    border: 1.5px solid var(--ma-line);
    background: #fff;
    padding: 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ma-ink);
    resize: none;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
  }
  body.mobile-app .ma-share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body.mobile-app .ma-share-grid .ma-secondary { background: #fff; min-height: 54px; }
  body.mobile-app .ma-share-grid .ma-secondary.is-done { background: var(--ma-green-l); }
  body.mobile-app .ma-sheet-share .ma-secondary,
  body.mobile-app .ma-sheet-menu .ma-secondary { background: #fff; }
  body.mobile-app .ma-menu { display: flex; flex-direction: column; gap: 8px; }
  body.mobile-app .ma-menu-row {
    display: flex; flex-direction: column; justify-content: center;
    min-height: 52px;
    padding: 10px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid var(--ma-line);
    font-weight: 700;
    font-size: 15px;
    width: 100%;
  }
  body.mobile-app .ma-menu-sub { font-size: 11px; font-weight: 500; color: var(--ma-mute); margin-top: 2px; }

  /* トースト (root 内) */
  body.mobile-app .ma-toast {
    position: absolute;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
    transform: translate(-50%, 10px);
    opacity: 0;
    background: var(--ma-ink);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    max-width: 88%;
    text-align: center;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 6;
  }
  body.mobile-app .ma-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
}
