/* スマホ（画面幅768px以下）だけの見た目（2026年10月15日 ナカウォ「STSをSP用として使いやすいようにUI・UXを最大限改善」「クライアント様にはアポイントや資料請求の情報をスマホで確認していただく可能性が高い」）。
   index.html で media="(max-width: 768px)" を付けて読むので、PC の見た目は変わらない。
   骨格：左のメニューは引き出し（左上のボタン）、下にタブ。表は横に送るか、カードにする。入力は16px（iPhone で拡大されない） */

/* ---------- 骨格 ---------- */
html, body { height: 100%; overscroll-behavior: none; }
.R, .R.MAC { min-width: 0 !important; width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
.R { font-size: 14px; -webkit-text-size-adjust: 100%; }
.R .app { width: 100vw; }

/* 上の帯：メニュー・クライアント名・アカウント */
.R.MAC .hd.sp-hd { height: calc(52px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 6px 0; display: flex; align-items: center; gap: 4px; position: relative; z-index: 20; }
.R .sp-hd .sp-mb { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 10px; color: #1d1d1f; flex: none; }
.R .sp-hd .sp-mb:active { background: #f2f2f5; }
.R .sp-hd .sp-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; padding: 0 4px; }
.R .sp-hd .sp-ht small { font-size: 10.5px; color: #8e8e93; font-weight: 600; }
.R .sp-hd .sp-ht b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.R .sp-hd .sp-ht b .ic { flex: none; color: #8e8e93; }
.R.MAC .sp-hd .av { display: inline-flex; width: 34px; height: 34px; margin: 0 6px; border-radius: 50%; align-items: center; justify-content: center; background: linear-gradient(135deg, #7fb2ff, #0766F4); color: #fff; font-weight: 700; font-size: 13px; flex: none; }

/* 左のメニュー＝引き出し */
.R.MAC .side { position: fixed; z-index: 900; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
  transform: translateX(-104%); visibility: hidden; transition: transform .26s cubic-bezier(.16,1,.3,1), visibility 0s .26s; box-shadow: none; }
.R.sp-menu .side { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.16,1,.3,1); box-shadow: 20px 0 60px -20px rgba(0,35,93,.35); }
.R .sp-scrim { position: fixed; inset: 0; z-index: 890; background: rgba(0,25,70,.28); opacity: 0; pointer-events: none; transition: opacity .2s; }
.R.sp-menu .sp-scrim { opacity: 1; pointer-events: auto; }
.R.MAC .side .it { height: 44px; font-size: 14px; gap: 12px; padding: 0 12px; border-radius: 10px; }
.R.MAC .side .it .ic { width: 19px; height: 19px; }
.R.MAC .side .sec { font-size: 12px; padding: 14px 12px 4px; }
.R.MAC .side .brand { height: 44px; }
.R.MAC .side .brand .sbx { display: none; }
.R.MAC .side .who2 { padding: 12px; font-size: 14px; }
.R .side .xs-ctx { margin: 4px 0 8px; }
.R .side .xs-row { min-height: 48px; }

/* 下のタブ */
.R .sp-tab { position: fixed; z-index: 800; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -.5px 0 rgba(0,0,0,.14); }
.R .sp-tab a, .R .sp-tab button { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 600 10.5px/1.1 var(--font); color: #8e8e93; background: none; border: 0; position: relative; padding: 0; }
.R .sp-tab .ic { width: 23px; height: 23px; }
.R .sp-tab .on { color: #0766F4; }
.R .sp-tab b { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }

/* ページ：縦に送る。下のタブに隠れないだけ空ける */
.R .page { padding: 14px 14px calc(84px + env(safe-area-inset-bottom, 0px)); gap: 12px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.R.sp-notab .page { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.R .page > * { flex-shrink: 0; }

/* 見出し：折り返す。ボタンは次の行へ */
.R .ptitle { flex-wrap: wrap; white-space: normal; gap: 6px 10px; align-items: center; }
.R .ptitle h1 { font-size: 20px !important; line-height: 1.25; margin: 0 !important; letter-spacing: -.02em; }
.R .ptitle .crumb { font-size: 12px; flex-basis: 100%; order: 1; margin: 0; }
.R .ptitle > .sp { flex-basis: 100%; height: 0; order: 2; }
.R .ptitle > .btn, .R .ptitle > a.btn, .R .ptitle > select, .R .ptitle > .inp { order: 3; }
.R .ptitle > select.inp, .R .ptitle > .inp { flex: 1 1 100%; }

/* 入力・ボタン：押しやすい大きさ。iPhone は app.js で入力時の拡大を止めるので、字は14px */
.R .inp, .R input.inp, .R select.inp, .R textarea.inp, .modal .inp, .sf-drw .inp, .xa-dw .inp { font-size: 14px !important; height: 38px; }
.R .inp.sm { height: 34px; }
.R textarea.inp, .modal textarea.inp { height: auto; }
.R .btn, .modal .btn { min-height: 36px; padding-left: 12px; padding-right: 12px; font-size: 13px; }
.R .btn.xs, .R .btn.sm { min-height: 32px; }
.R .ib { min-width: 36px; min-height: 36px; }

/* 期間の切り替え：区分は横に送る。日付は2つ並べる */
.R .fbar2 { overflow: visible; }
.R .perb { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
.R .perb .seg4 { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.R .perb .seg4::-webkit-scrollbar { display: none; }
.R .perb .seg4 a { flex: none; }
.R .perb .pm { display: none; }
.R .perb .rng { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 6px; }
.R .perb .rng .inp { width: 100%; min-width: 0; }

/* 区分（タブ・チップ）は横に送る */
.R .seg4, .R .tabs, .R .lc-chs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; max-width: 100%; }
.R .seg4::-webkit-scrollbar, .R .tabs::-webkit-scrollbar, .R .lc-chs::-webkit-scrollbar { display: none; }

/* 面（ペイン）：2列・3列は1列に */
.R .ix2, .R .ix2.eq, .R .ix3, .R .xa-dx, .R .sgrid { grid-template-columns: minmax(0, 1fr) !important; }
.R .ixp, .R .pane { min-width: 0; }
.R .ph { min-height: 42px; height: auto; flex-wrap: wrap; row-gap: 4px; padding-top: 8px; padding-bottom: 8px; }

/* 表：横に送る（カードにしない表） */
.R .tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.R .tb td, .R .tb th { white-space: nowrap; }
.R .tb { min-width: 0; }
.R .tb td { padding-left: 8px; padding-right: 8px; }
.R .tb th { padding-left: 8px; padding-right: 8px; }
.R .tb td:first-child, .R .tb th:first-child { padding-left: 12px; }

/* 窓（モーダル）＝下から出るシート */
.modal-bg { align-items: flex-end; }
.modal.R { height: auto !important; min-height: 0; }
.modal { width: 100% !important; max-width: 100vw !important; border-radius: 18px 18px 0 0 !important; padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important; max-height: 92dvh !important; animation: sp-sheet .26s cubic-bezier(.16,1,.3,1); }
.modal > .frm { margin: 0 -16px !important; padding: 2px 16px !important; }
.modal .frm .row2 { grid-template-columns: 1fr !important; }
.modal .mf { position: sticky; bottom: 0; background: #fff; padding-top: 10px; }
.modal .mf .btn { flex: 1; justify-content: center; }
@keyframes sp-sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* 右から出る詳細は全面 */
.xa-dw, .R.sf-drw, .sf-drw { width: 100vw !important; max-width: 100vw; }

/* 知らせは下のタブの上 */
.toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 32px); }

@media (prefers-reduced-motion: reduce) { .R.MAC .side, .modal, .spd.R { transition: none; animation: none; } }

/* ---------- ダッシュボード ---------- */
.R .d2 .xd-head { display: block; }
.R .d2 .xd-tt h1 { font-size: 19px !important; white-space: normal; }
.R .d2 .xd-bar { flex-wrap: wrap; gap: 8px; padding: 10px; }
.R .d2 .xd-bar .seg2 { order: 1; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
.R .d2 .xd-bar .seg2 span { flex: 1 0 auto; justify-content: center; padding: 6px 10px; font-size: 12.5px; }
.R .d2 .xd-rng { order: 2; flex: 1 1 100%; display: grid; grid-template-columns: 1fr auto 1fr; }
.R .d2 .xd-rng .inp { width: 100%; }
.R .d2 .xd-cmp { order: 3; }
.R .d2 .xd-bar > .sp { order: 4; }
.R .d2 .xd-bar > .btn { order: 5; }
.R .d2 .dg { display: flex !important; flex-direction: column; gap: 12px; }
.R .d2 .dleft, .R .d2 .dright { display: flex; flex-direction: column; gap: 12px; min-width: 0; width: 100%; }
.R .dstat { grid-template-columns: 1fr 1fr; padding: 4px 0; }
.R .dstat > div { padding: 10px 14px; border-left: 0; border-top: .5px solid rgba(0,0,0,.08); }
.R .dstat > div:first-child { grid-column: 1 / -1; border-top: 0; }
.R .dstat > div:nth-child(odd):not(:first-child) { border-left: .5px solid rgba(0,0,0,.08); }
.R .dstat b { font-size: 15px; white-space: normal; }
.R .kgrid.xk { grid-template-columns: 1fr 1fr !important; gap: 10px; }
.R .kgrid.xk .kc.main { grid-column: 1 / -1; }
.R .kgrid.xk .kc { min-height: 112px; padding: 10px 12px 9px; }
.R .kgrid.xk .kvl { font-size: 23px; }
.R .kgrid.xk .kc.main .kvl { font-size: 31px; }
.R .kgrid.xk .ks { white-space: normal; }
.R .d2 .fpane .fheads { overflow-x: auto; }
.R .d2 .tgp .xa-tgw { overflow-x: auto; }
.R .d2 .lpane .lrow { min-height: 48px; gap: 8px; }
.R .d2 .lpane .lrow .lt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.R .attn2 .ar2 { min-height: 56px; }

/* ---------- リード管理 ---------- */
.R .lc .ptitle .btn[data-act="csv"], .R .lc .ptitle a[href="#/leads/import"] { display: none; }
.R .lc-chs { flex-wrap: nowrap; margin: 0 -14px; padding: 2px 14px 4px; gap: 6px; }
.R .lc-c { flex: none; white-space: nowrap; height: 32px; padding: 0 12px; font-size: 12.5px; }
.R .lc-bar { margin: 0; gap: 8px; }
.R .lc-bar .tabs { flex: 1 1 100%; margin: 0 -14px; padding: 0 14px; gap: 4px; }
.R .lc-bar .st { flex: none; padding: 7px 10px; font-size: 13px; }
.R .lc-bar > .sp { display: none; }
.R .lc-bar #lcph { order: 3; flex: 0 0 auto; width: auto; max-width: 42%; }
.R .lc-bar .tabs { order: 1; }
.R .lc-q { order: 2; flex: 1 1 180px; min-width: 0; }
.R .lc-q .inp { width: 100%; }
.R .spl-w { display: flex; flex-direction: column; gap: 8px; }
.R .spl-day { display: flex; align-items: baseline; gap: 8px; padding: 10px 2px 6px; font-size: 13px; color: #3a3a3c; position: sticky; top: -14px; z-index: 2; background: linear-gradient(#fff 70%, rgba(255,255,255,0)); }
.R .spl-day span { font-size: 12px; color: #8e8e93; }
.R .spl { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: left; padding: 12px 40px 12px 14px; border: 0; border-radius: 14px; background: #fff; font: inherit; color: inherit;
  box-shadow: 0 0 0 .5px rgba(39,44,48,.12), 0 1px 2px rgba(39,44,48,.05), 0 8px 20px -14px rgba(39,44,48,.25); }
.R .spl:active { background: #f5f8ff; }
.R .spl-h { display: flex; align-items: center; gap: 6px; width: 100%; margin-bottom: 2px; }
.R .spl-h .sp { flex: 1; }
.R .spl-co { font-size: 14.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.R .spl-ct { font-size: 12.5px; color: #3a3a3c; }
.R .spl-vo { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; padding: 4px 9px; border-radius: 8px; background: #fff1ef; color: #b42318; font-size: 12.5px; font-weight: 700; }
.R .spl-src { font-size: 11.5px; color: #8e8e93; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.R .spl-ar { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #c7c7cc; display: flex; }
.R .lc-more { display: block; text-align: center; padding: 14px; font-weight: 600; color: #0766F4; }

/* リード詳細（全面） */
.spd.R { position: fixed; inset: 0; z-index: 950; width: 100vw; height: 100dvh; background: #f5f6f8; display: flex; flex-direction: column; animation: sp-in .24s cubic-bezier(.16,1,.3,1); }
@keyframes sp-in { from { transform: translateX(24px); opacity: .5; } to { transform: none; opacity: 1; } }
.spd .spd-hd { flex: none; display: flex; align-items: center; gap: 4px; height: calc(52px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 10px 0 6px; background: rgba(255,255,255,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 .5px 0 rgba(0,0,0,.14); }
.spd .spd-hd .sp-mb { width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #0766F4; }
.spd .spd-hd > b { font-size: 16px; }
.spd .spd-hd .sp { flex: 1; }
.spd .spd-b { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.spd .spd-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.spd .spd-top .sp { flex: 1; }
.spd .spd-co { margin: 0; font-size: 19px; line-height: 1.35; letter-spacing: -.01em; }
.spd .spd-vo { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #ff5a4e, #d92d20); color: #fff; box-shadow: 0 12px 28px -14px rgba(217,45,32,.7); }
.spd .spd-vo span { grid-column: 1 / -1; font-size: 12px; font-weight: 600; opacity: .85; }
.spd .spd-vo b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.spd .spd-vo em { font-style: normal; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.22); }
.spd .spd-vo.none { background: #fff; color: #1d1d1f; box-shadow: 0 0 0 .5px rgba(39,44,48,.12); }
.spd .spd-vo.none span { color: #8e8e93; opacity: 1; }
.spd .spd-vo.none b { color: #8e8e93; }
.spd .spd-vo.doc { background: linear-gradient(135deg, #3d8bff, #0766F4); box-shadow: 0 12px 28px -14px rgba(7,102,244,.7); }
.spd .spd-s { background: #fff; border-radius: 14px; padding: 4px 16px 6px; box-shadow: 0 0 0 .5px rgba(39,44,48,.10); }
.spd .spd-s h3 { margin: 0; padding: 12px 0 6px; font-size: 12.5px; color: #8e8e93; font-weight: 700; }
.spd .spd-who { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; }
.spd .spd-who b { font-size: 15.5px; }
.spd .spd-who span { font-size: 13px; color: #6e6e73; }
.spd .spd-act { display: flex; gap: 8px; padding-bottom: 12px; }
.spd .spd-act:empty { display: none; }
.spd .spd-act .btn { flex: 1; justify-content: center; gap: 6px; min-height: 42px; border-radius: 12px; font-size: 14px; }
.spd .spd-r { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: .5px solid rgba(0,0,0,.08); font-size: 13.5px; }
.spd .spd-r > span { flex: none; color: #6e6e73; }
.spd .spd-r > b, .spd .spd-r > a { text-align: right; font-weight: 600; word-break: break-all; min-width: 0; }
.spd .spd-r > a { color: #0766F4; }
.spd .spd-lv { display: inline-flex; align-items: center; gap: 4px; }
.spd .spd-lv i { width: 10px; height: 10px; border-radius: 50%; background: #e3e6ec; }
.spd .spd-lv i.on { background: #0766F4; }
.spd .spd-lv em { font-style: normal; margin-left: 6px; color: #3a3a3c; }
.spd .spd-dt { margin: 0 0 12px; font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.spd .spd-no { padding: 4px 0 12px; font-size: 13px; }
.spd .spd-lk { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 .5px rgba(39,44,48,.10); font-weight: 600; color: #1d1d1f; }
.spd .spd-lk span { flex: 1; }
.spd .spd-lk .ic:first-child { color: #0766F4; }
.spd .spd-lk .ic:last-child { color: #c7c7cc; }

/* ---------- 通話録音 ---------- */
.R .xa-cf { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.R .xa-cf .xa-cq { order: -1; grid-column: 1 / -1; width: 100% !important; }
.R .xa-cf > .sp { display: none; }
.R .xa-cf select.inp, .R .xa-cf input[type="date"] { width: 100%; min-width: 0; }
.R .xa-cf .ck2 { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13.5px; }
.R .xa-cf > .mut { display: none; }
.R table.xa-ct { display: block; min-width: 0 !important; }
.R table.xa-ct thead { display: none; }
.R table.xa-ct tbody { display: flex; flex-direction: column; }
.R table.xa-ct tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 60px 12px 14px; border-bottom: .5px solid rgba(0,0,0,.08); }
.R table.xa-ct tr:nth-child(even) td { background: none; }
.R table.xa-ct td { display: block; padding: 0 !important; border: 0 !important; height: auto; background: none !important; white-space: nowrap; }
.R table.xa-ct td.co { order: 1; flex: 1 1 100%; white-space: normal; }
.R table.xa-ct td.co .xa-nm { font-size: 14px; font-weight: 700; white-space: normal; overflow: visible; }
.R table.xa-ct td.c-rs { order: 2; }
.R table.xa-ct td.c-dt { order: 3; font-size: 12.5px; }
.R table.xa-ct td.c-ln { order: 4; font-size: 12.5px; color: #6e6e73; }
.R table.xa-ct td.c-ln::before { content: '通話 '; }
.R table.xa-ct td.c-mb { order: 5; font-size: 12.5px; color: #6e6e73; }
.R table.xa-ct td.c-tr { order: 6; font-size: 12px; }
.R table.xa-ct td.c-tr:not(.on) { display: none; }
.R table.xa-ct td.c-tr.on { padding: 1px 7px !important; border-radius: 6px; background: #e8f1ff !important; color: #0550c8; font-weight: 700; }
.R table.xa-ct td.c-tr.on::before { content: '文字起こし '; }
.R table.xa-ct td.c-tr.on { font-size: 0; } .R table.xa-ct td.c-tr.on::before { font-size: 11.5px; }
.R table.xa-ct td.c-rec { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.R table.xa-ct td.c-rec .mut { display: none; }
.R table.xa-ct td.c-rec .ib { width: 40px; height: 40px; border-radius: 50%; background: #0766F4; color: #fff; box-shadow: 0 6px 16px -8px rgba(7,102,244,.8); }
.R table.xa-ct .empty { padding: 28px 0; }
.R .xa-pg { flex-wrap: wrap; gap: 8px; }
.R .xa-pg > .mut { flex: 1 1 100%; text-align: center; }
.R .xa-pg > .sp { display: none; }
.R .xa-pg .btn { flex: 1; justify-content: center; }

/* ---------- 共通のはみ出し ---------- */
.R .ph b { white-space: normal; min-width: 0; }
.R .seg4 > *, .R .seg2 > * { flex: none; white-space: nowrap; }
.R .fbar2 { flex-wrap: wrap; gap: 8px; }
.R .fbar2 > select.inp, .R .fbar2 > .inp { flex: 1 1 100%; max-width: 100%; }
.R .fbar2 .cl2 { flex: 1 1 100%; }
.R .agrid { grid-template-columns: minmax(0, 1fr) !important; }
.R .an-ins, .R .pb:has(> table) { overflow-x: auto; }
.R .an-kt { grid-template-columns: minmax(0, 1fr) !important; }
.R .rw { grid-template-columns: minmax(0, 1fr) auto; height: auto; padding: 6px 0; row-gap: 4px; }
.R .rw > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }

/* ---------- 予実管理 ---------- */
.R .sf-kpi { grid-template-columns: 1fr 1fr !important; gap: 10px; }
.R .sf-k { padding: 12px 14px !important; min-width: 0; }
.R .sf-k * { white-space: normal !important; }
.R .sf-k b { font-size: 20px !important; }
.R .sf-todo { grid-template-columns: 1fr 1fr !important; gap: 8px; }
.R .sf-t * { white-space: normal !important; }
.R .sf-pipe { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.R .sf-ps { min-width: 0 !important; flex: none !important; }
.R .sf-ps * { white-space: normal; }
.R table.sf-lt tr.clk > td:nth-child(8) .lc-one { display: inline; }
.R table.sf-lt { display: block; min-width: 0 !important; }
.R table.sf-lt colgroup, .R table.sf-lt thead { display: none; }
.R table.sf-lt tbody, .R table.sf-lt tfoot { display: flex; flex-direction: column; }
.R table.sf-lt tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 14px; border-bottom: .5px solid rgba(0,0,0,.08); position: relative; }
.R table.sf-lt tr.due { box-shadow: inset 3px 0 0 #d92d20; }
.R table.sf-lt td { display: block; padding: 0 !important; border: 0 !important; height: auto; background: none !important; white-space: nowrap; }
.R table.sf-lt tr.clk > td:nth-child(2) { order: 1; flex: 1 1 100%; white-space: normal; }
.R table.sf-lt tr.clk > td:nth-child(2) .lc-co { font-size: 14px; font-weight: 700; white-space: normal; }
.R table.sf-lt tr.clk > td:nth-child(2) .lc-sub { white-space: normal; }
.R table.sf-lt tr.clk > td:nth-child(1) { order: 2; flex: 1 1 100%; white-space: normal; font-size: 13px; }
.R table.sf-lt tr.clk > td:nth-child(3) { order: 3; }
.R table.sf-lt tr.clk > td:nth-child(4) { order: 4; }
.R table.sf-lt tr.clk > td:nth-child(5) { order: 5; font-size: 13px; font-weight: 700; }
.R table.sf-lt tr.clk > td:nth-child(5)::before { content: '金額 '; font-weight: 500; color: #8e8e93; }
.R table.sf-lt tr.clk > td:nth-child(6) { display: none; }
.R table.sf-lt tr.clk > td:nth-child(7) { order: 6; font-size: 12.5px; }
.R table.sf-lt tr.clk > td:nth-child(7)::before { content: '受注予定 '; color: #8e8e93; }
.R table.sf-lt tr.clk > td:nth-child(8) { order: 7; font-size: 12.5px; }
.R table.sf-lt tr.clk > td:nth-child(8)::before { content: '担当 '; color: #8e8e93; }
.R table.sf-lt tr.sf-gh td, .R table.sf-lt tr.sf-tf td { flex: 1 1 100%; white-space: normal; }
.R table.sf-lt .sf-ghl { flex-wrap: wrap; row-gap: 4px; }

/* ---------- レポート ---------- */
.R .xr-pseg { max-width: 100%; }
.R details.xr-apx .ph b { white-space: normal; }

/* ---------- 架電画面・アプローチ先（リード詳細の「アプローチ履歴・通話録音」から開く） ---------- */
.R main.call, .R main.call.wl, .R main.call.wl.sheetmode { display: flex !important; flex-direction: column; gap: 12px; overflow-y: auto; padding: 12px 14px calc(84px + env(safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; }
.R main.call > * { flex-shrink: 0; min-width: 0; }
.R main.call .clp { display: none; }
.R main.call .lp, .R main.call .rp { width: 100%; padding: 0; border: 0; overflow: visible; }
.R main.call .lp .ctx { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
.R main.call .who .nm { font-size: 19px !important; line-height: 1.3; writing-mode: horizontal-tb; white-space: normal; }
.R main.call .tel { flex-wrap: wrap; gap: 8px; }
.R main.call .tel .btn.call { flex: 1 1 100%; min-width: 0; justify-content: center; height: 48px; }
.R main.call .tel .xa-gs { flex: 1 1 0; justify-content: center; font-size: 12.5px; }
.R main.call .rp .pane { overflow: visible; }
.R .app > footer.ft { display: none; }
.R main.call .hist, .R main.call table.hist { min-width: 0; }
.R main.call .pane .tblwrap, .R main.call .pane .pb { overflow-x: auto; }

/* ---------- ログイン ---------- */
.xa-lg form { padding: 32px 22px 26px; border-radius: 18px; }
.xa-lg input { font-size: 16px; padding: 12px 2px; }
.xa-lg button { min-height: 48px; font-size: 15px; }

/* ---------- 設定・Admin管理の左の小さなメニュー＝横に並べる ---------- */
.R .sgrid { display: flex !important; flex-direction: column; gap: 12px; flex: none; min-height: auto; }
.R .sgrid > * { flex: none; }
.R .snav { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; position: static; width: auto; }
.R .snav::-webkit-scrollbar { display: none; }
.R .snav .ssec { display: none; }
.R .snav .sit { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; background: #f2f3f5; white-space: nowrap; }
.R .snav .sit.on { background: #1d1d1f; color: #fff; }
.R .snav .sit.on .ic { color: #fff; }
.R .scol { min-width: 0; }

/* ---------- 全体の指標カード ---------- */
.R .ixk, .R .ixk.k4, .R .ixk.k6, .R .ixk.k9 { grid-template-columns: 1fr 1fr !important; gap: 10px; }
.R .ixk .kc2.hero { grid-column: 1 / -1; }
.R .ixk .kc2 .v, .R .ixk .ixc .v { font-size: 21px; }
.R .ixk .kc2.hero .v { font-size: 28px; }
.R .ixk .kc2, .R .ixk .ixc { padding: 12px 14px; }

/* アプローチ履歴（日時・結果・活動概要・担当・録音）＝カード。企業情報は1列 */
.R table.hist { display: block; min-width: 0 !important; width: 100%; }
.R table.hist thead { display: none; }
.R table.hist tbody { display: flex; flex-direction: column; }
.R table.hist tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 56px 12px 14px; border-bottom: .5px solid rgba(0,0,0,.08); }
.R table.hist td { display: block; padding: 0 !important; border: 0 !important; height: auto; background: none !important; white-space: nowrap; width: auto !important; }
.R table.hist td:nth-child(1) { order: 2; font-size: 12.5px; color: #6e6e73; }
.R table.hist td:nth-child(2) { order: 1; }
.R table.hist td:nth-child(3) { order: 4; flex: 1 1 100%; white-space: normal; font-size: 13.5px; line-height: 1.6; color: #1d1d1f; writing-mode: horizontal-tb; overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; display: block; }
.R table.hist td:nth-child(3) * { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; -webkit-line-clamp: unset !important; }
.R table.hist td:nth-child(4) { order: 3; font-size: 12.5px; color: #6e6e73; }
.R table.hist td:nth-child(5) { position: absolute; right: 12px; top: 12px; }
.R table.hist td:nth-child(5) .ib { width: 40px; height: 40px; border-radius: 50%; background: #0766F4; color: #fff; }
.R table.hist td[colspan] { flex: 1 1 100%; position: static; }
.R .kvg { grid-template-columns: minmax(0, 1fr) !important; }
.R .kvg .kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.R .kvg .kv b { white-space: normal !important; text-align: right; word-break: break-all; overflow: visible !important; text-overflow: clip !important; min-width: 0; }

/* 大きい数字・見出しを一段小さく（2026年10月15日 ナカウォ「もう少し字を小さくして、見やすく」） */
.R .kc2 .kq-r b { font-size: 15px; }
.R .d2 .fh b.num { font-size: 19px; }
.R .attn2 b.an { font-size: 17px; }
.R .an-t > b.num { font-size: 26px; }
.R .sf-ps b.num, .R .sf-t b.num { font-size: 17px; }
.R .tool b.num.big { font-size: 21px; }
.R .xr-cv h2 { font-size: 24px; }
.R .xr-h h3 { font-size: 16px; }
.R .xr-h .xr-no { font-size: 21px; }
.R .xr-kc b.xr-kv { font-size: 25px; }
.R .xr-card b.xr-big { font-size: 21px; }
.R .xr-donv b { font-size: 22px; }
.R .xr-fl b.num { font-size: 16px; }

/* コックピットの AI監査：2列を1列に（文字が重なっていた） */
.R .fds.two { grid-template-columns: minmax(0, 1fr); }
.R .fds a { min-width: 0; grid-template-columns: 18px minmax(0, 1fr); }
.R .fds b { display: block; white-space: normal; overflow-wrap: anywhere; }

/* 狭い端末（幅360px未満） */
.R .sp-tab span { white-space: nowrap; }
@media (max-width: 359px) {
  .R .sp-tab a, .R .sp-tab button { font-size: 9.5px; letter-spacing: -.02em; }
  .R .perb .rng, .R .d2 .xd-rng { grid-template-columns: 1fr !important; }
  .R .perb .rng > span, .R .perb .rng > i, .R .d2 .xd-rng > i { display: none; }
  .R .page { padding-left: 12px; padding-right: 12px; }
}
.modal:focus { outline: none; }
.R .d2 .lpane a.lrow { color: inherit; }
.R .d2 .lpane a.lrow::after { content: ''; width: 7px; height: 7px; border-top: 1.5px solid #c7c7cc; border-right: 1.5px solid #c7c7cc; transform: rotate(45deg); flex: none; margin-left: 2px; }
