:root {
  color-scheme: light;
  --ink: #1e2421;
  --muted: #66736e;
  --line: #dbe1dc;
  --paper: #f7f5ee;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-soft: #e6f3f0;
  --accent-dark: #0b5f59;
  --blue: #315f8c;
  --amber: #a76f22;
  --rose: #a95261;
  --shadow: 0 14px 40px rgba(30, 36, 33, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  /* iOSのラバーバンド（上下端でビヨーンと跳ね、固定背景の外＝素の色が帯になって出る）を抑える。
     Androidのオーバースクロールにも効く。保険として、跳ねた時に出る html の色も本体に合わせる。 */
  overscroll-behavior: none;
  background: #f4f6f2;
}
html[data-skin="glass"] { background: #e9f3f0; }

body {
  margin: 0;
  min-height: 100vh;
  overscroll-behavior: none;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-version {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  vertical-align: middle;
}

.data-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.data-actions {
  display: grid;
  /* minmax(0,1fr)＝1frの暗黙min-content膨張を止める（claude-393）。非Proは.pro-lockedのnowrapで
     ボタンのmin-contentが全文幅に膨らみ、360-375px端末で行が枠を突き破り設定パネルが横スクロールしていた。 */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}
/* この2カラム内だけは折り返しを許す（Pro解除後と同じ折り返し方＝Proバッジは文末に続く）。
   nowrap本来の目的（バッジが単独で下の行に落ちない）はインラインの::afterなので折り返しでも保たれる。 */
.data-actions .pro-locked { white-space: normal; }
.data-import-label {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  cursor: pointer;
  text-align: center;
}
.data-import-label input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.data-status {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  min-height: 16px;
}

.app-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.workspace {
  min-height: calc(100vh - 40px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 18px;
}

.topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f7f5ee;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }

.brand-name {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}
.brand-name .fcl-logo {
  height: 22px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: var(--accent-dark);
  text-align: center;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(30, 36, 33, 0.07);
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-band div,
.progress-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-band div {
  min-height: 64px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 14px;
}

.summary-band span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.summary-band strong {
  font-size: 16px;
}

.progress-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.progress-step {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.progress-step.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.mobile-tabbar {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  min-width: 0; /* グリッド子のmin-content膨張を防ぐ＝nowrapの行が枠内に収まる */
}

.material-picker-panel,
.draft-panel {
  grid-column: span 2;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.camera-preview {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.capture-sheet {
  display: grid;
  gap: 12px;
}

.sheet-handle {
  display: none;
}

.capture-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.capture-actions .primary-button,
.capture-actions .ghost-button {
  grid-column: 1 / -1;
}

.capture-memo {
  margin-top: 14px;
}

.capture-memo-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 850;
  color: var(--ink);
}

.memo-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.memo-chip {
  border: 1px solid #c6cdc9;
  border-radius: 999px;
  background: #eff1f0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 13px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.memo-chip:hover {
  border-color: var(--accent);
}

.memo-chip.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
/* 「他をみる…」＝畳んだ残りを開く控えめチップ（増えすぎ対策・⑤）。 */
.memo-chip.chip-more, .scan-cap-chip.chip-more { font-weight: 700; opacity: 0.72; }

/* 「この人のSNS・WEBを見る」＝1タップで開く（“送る”=share-include-chip とは別物）。claude-457で記憶カードへ昇格。 */
.cd-view-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.cd-view-grid[hidden] { display: none; }
.cd-view-chip {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #fff;
  color: var(--accent-dark);
  border-radius: 11px;
  padding: 4px 6px;
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.cd-view-chip:hover { background: #f2faf7; border-color: rgba(15, 118, 110, 0.32); }
.cd-view-chip:active { transform: translateY(1px); }
.cd-view-brand {
  width: 22px;
  height: 22px;
  padding: 3px;
  border: 1px solid rgba(17, 35, 31, 0.1);
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
}
.cd-view-brand img { display: block; width: 16px; height: 16px; object-fit: contain; }
.cd-view-brand svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cd-view-brand[data-social-brand="x"] { background: #000; border-color: #000; }
.cd-view-brand[data-social-brand="x"] img { width: 10px; height: 10px; }
.cd-view-brand[data-social-brand="discord"] { background: #5865f2; border-color: #5865f2; }
.cd-view-brand[data-social-brand="discord"] img { width: 16px; height: 12px; }
.cd-view-brand[data-social-brand="line"] { width: 40px; height: 40px; padding: 0; border: 0; }
.cd-view-brand[data-social-brand="line"] img { width: 40px; height: 40px; }
.cd-view-copy { min-width: 0; flex: 1 1 auto; }
.cd-view-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-view-name { color: var(--ink); font-size: 11.5px; font-weight: 850; }
/* 連絡先を開いた直後、名前のすぐ下に行き先を出す。2件なら横並び、増えたら折り返す。 */
.share-include.cd-hero-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
  padding: 8px;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 14px;
  background: rgba(235, 247, 243, 0.72);
}
.share-include.cd-hero-links[hidden] { display: none; }
.cd-hero-links .share-include-lead { grid-column: 1 / -1; text-align: left; font-size: 11px; }

/* 行動ハブの初期画面だけ、SNSが多い人も行動を押し下げない1段の棚にする。
   全件を残したまま横に送れ、情報表示を開けば従来の2列一覧へ戻る。 */
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .share-include.cd-hero-links {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  padding-top: 30px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .share-include.cd-hero-links::-webkit-scrollbar { display: none; }
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .cd-hero-links .share-include-lead {
  position: absolute;
  inset: 8px auto auto 16px;
}
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .cd-hero-links .cd-view-chip {
  flex: 0 0 44%;
  min-width: 145px;
  max-width: 190px;
  scroll-snap-align: start;
}
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .cd-hero-links .cd-view-brand[data-social-brand="line"] {
  width: 22px;
  height: 22px;
}
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .cd-hero-links .cd-view-brand[data-social-brand="line"] img {
  width: 22px;
  height: 22px;
}

/* Lab：連絡先カードの先頭を「この人と何をするか」で分ける。
   現行の人物・SNS部品はそのまま使い、行動の選択後だけ既存の編集／記録画面へ進む。 */
.cd-action-hub {
  display: grid;
  gap: 12px;
  margin: 2px 0 4px;
}
.cd-action-hub[hidden] { display: none; }
.cd-action-memory {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(235, 247, 243, 0.72);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.cd-action-memory[hidden] { display: none; }
.cd-action-memory-label,
.cd-action-memory-date {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.cd-action-memory-text {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-action-memory > svg,
.cd-action-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cd-action-memory > svg { color: var(--accent-dark); }
.cd-action-question {
  margin: 4px 2px 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}
.cd-action-list { display: grid; gap: 9px; }
.cd-action-row {
  width: 100%;
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 17px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(227, 243, 239, 0.78);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cd-action-row:active { transform: translateY(1px); }
.cd-action-row-primary {
  min-height: 78px;
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(14, 141, 124, 0.20);
}
.cd-action-row-info { background: var(--panel); }
.cd-action-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.66);
}
.cd-action-row-primary .cd-action-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.cd-action-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cd-action-copy { min-width: 0; display: grid; gap: 3px; }
.cd-action-copy strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}
.cd-action-copy small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.45;
}
.cd-action-row-primary .cd-action-copy small { color: rgba(255, 255, 255, 0.84); }
.cd-action-arrow { justify-self: end; color: var(--accent-dark); }
.cd-action-row-primary .cd-action-arrow { color: #fff; }
.cd-relationship-flags { display: flex; gap: 8px; flex-wrap: wrap; }

/* 行動ハブでは情報の縦並びをいったん閉じる。「情報を見る・編集する」を選んだ時だけ既存部品を戻す。 */
.contact-detail-panel.is-action-hub #cdMemoryHero,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdCardPhotos,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .cd-card-add-row,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdRelationshipFlags,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdReunion,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdRecap,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdReconnectButton,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdSeasonalButton,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdSeasonalPicker,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdSectionInfo,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdSectionNews,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) #cdSectionMemory,
.contact-detail-panel.is-action-hub:not(.is-action-details-open) .contact-detail-actions {
  display: none;
}

@media (max-width: 360px) {
  .cd-action-memory { grid-template-columns: auto minmax(0, 1fr) 18px; }
  .cd-action-memory-date { display: none; }
  .cd-action-row { grid-template-columns: 36px minmax(0, 1fr) 18px; gap: 10px; padding-inline: 11px; }
  .cd-action-icon { width: 36px; height: 36px; }
  .cd-action-copy strong { font-size: 14px; }
}

.capture-save-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.draft-memory {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8f5;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.draft-memory-title {
  margin: 0 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 850;
  color: var(--accent-dark);
}

.draft-memory-note {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
}

.draft-memory-body {
  margin: 0;
  font-size: 14px;
  white-space: pre-wrap;
  color: var(--ink);
}

.draft-memory-place {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
}

.draft-memory-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.draft-memory-media:empty {
  display: none;
}

.draft-memory-thumb {
  inline-size: 56px;
  block-size: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-top: 8px;
}

.draft-memory-audio {
  inline-size: 100%;
  height: 38px;
  margin-top: 8px;
}

/* 記憶カード：場所トグル・思い出写真・音声 */
.cd-checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: rgba(227, 243, 239, 0.46);
}

.cd-checkline input {
  inline-size: 20px;
  block-size: 20px;
  flex: 0 0 auto;
}

.cd-memory-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.cd-memory-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  color: var(--muted);
}

.cd-memory-cell {
  position: relative;
  inline-size: 76px;
  block-size: 76px;
  border-radius: 8px;
  background: #f1f3f1;
  border: 1px solid var(--line);
  overflow: hidden;
}

.cd-memory-img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}

.cd-memory-del {
  position: absolute;
  inset-block-start: 2px;
  inset-inline-end: 2px;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 28, 24, 0.72);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

/* 名刺写真ギャラリー（claude-293/297）：1枚=大きく1枚／複数=横スワイプでチラ見せ。「名刺を足す」は下の小ボタンに別置き（矢野FB＝1枚の名刺を邪魔しない） */
.cd-card-photos {
  display: flex;
  gap: 8px;
  margin: 4px 0 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cd-card-photos::-webkit-scrollbar { display: none; }
.cd-card-photos.is-empty { display: none; } /* 0枚（SNS交換の相手）は帯ごと消す */
.cd-card-cell {
  position: relative;
  flex: 0 0 100%;                 /* 1枚＝全幅で大きく */
  scroll-snap-align: center;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #10231d;            /* 縦向き名刺は contain で上下に余白＝この地色 */
  border: 1px solid var(--line);
  overflow: hidden;
}
.cd-card-photos.is-multi .cd-card-cell { flex-basis: 90%; } /* 複数は次を少しチラ見せ＝スワイプに気づく */
.cd-card-img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;           /* 名刺全体を切らずに見せる（表裏・縦横どちらも） */
  display: block;
}
.cd-card-del {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 28, 24, 0.62);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.cd-card-add-row { display: flex; justify-content: center; margin: 0 0 10px; }
.cd-card-addbtn { font-size: 12.5px; padding: 6px 14px; }

.cd-add-photo {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  cursor: pointer;
  background: rgba(227, 243, 239, 0.85);
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--accent-dark);
}

.cd-add-photo input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.cd-voice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.cd-voice-audio {
  inline-size: 100%;
  height: 40px;
}

.cd-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cd-voice-actions .ghost-button {
  flex: 1 1 auto;
  min-height: 42px;
  background: rgba(227, 243, 239, 0.85);
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--accent-dark);
}

.cd-voice-delbtn {
  background: #fff4f2 !important;
  border-color: rgba(163, 45, 45, 0.26) !important;
  color: var(--danger, #a3331f) !important;
}

.cd-voice-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.cd-voice-rec {
  font-size: 13px;
  font-weight: 850;
  color: #a3331f;
  align-self: center;
}

.upload-drop {
  min-height: 52px;
  border: 1px dashed #8fa09a;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: #f5f8f5;
  color: var(--accent-dark);
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-drop span {
  font-size: 14px;
  font-weight: 850;
}

/* .cd-file-btn（名刺2ボタンの不可視input）は claude-309 で撤去＝名刺読み取りを名刺ギャラリーに一本化 */

.ocr-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.scan-frame {
  min-height: 224px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #edf2ee;
  overflow: hidden;
}

.scan-frame img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
}

.business-card {
  width: min(370px, 100%);
  aspect-ratio: 1.72;
  border-radius: 8px;
  padding: 22px;
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(30, 36, 33, 0.16);
}

.business-card p {
  margin: 0;
}

.card-company {
  color: var(--muted);
  font-size: 13px;
}

.card-name {
  margin-top: 22px !important;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.card-role {
  margin-top: 4px !important;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.card-email {
  margin-top: 28px !important;
  color: var(--muted);
  font-size: 14px;
}

.ocr-box {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.ocr-box summary {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.ocr-box textarea {
  margin: 12px 0 10px;
}

.contact-form,
.material-form,
.draft-box,
.question-stack {
  display: grid;
  gap: 12px;
}

.contact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.material-form {
  grid-template-columns: 0.75fr 1fr 1.5fr auto;
  align-items: end;
  margin-bottom: 14px;
}

.contact-form label:last-child,
.wide-label {
  grid-column: span 2;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px; /* 16px未満だとiOSがフォーカス時に自動ズーム→拡大固着・タップずれ(デッドタップ)の原因（実機FB・claude-246） */
}

select {
  min-height: 44px;
  appearance: none;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

.question-block {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.question-title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.choice-grid,
.tag-grid,
.answer-row,
.line-options,
.material-list,
.send-grid,
.status-controls,
.tone-tabs {
  display: grid;
  gap: 8px;
}

.choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.answer-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purpose-stack {
  display: grid;
  gap: 12px;
}

.purpose-group {
  display: grid;
  gap: 8px;
}

.purpose-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.choice-button,
.answer-button,
.tag-button,
.line-option,
.tone-button,
.status-button {
  border: 1px solid #c6cdc9;
  border-radius: 8px;
  background: #eff1f0;
  color: var(--ink);
  text-align: left;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.choice-button,
.answer-button,
.tag-button {
  min-height: 48px;
  padding: 10px;
  font-size: 13px;
}

.choice-button:hover,
.answer-button:not(:disabled):hover,
.tag-button:hover,
.line-option:hover,
.tone-button:hover,
.status-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.choice-button.is-selected,
.answer-button.is-selected,
.tag-button.is-selected,
.line-option.is-selected,
.tone-button.is-selected,
.status-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.answer-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.draft-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* A案（claude-209）：下書き画面から相手のチャネルへそのまま送る */
.draft-send {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e3e0d6);
  display: grid;
  gap: 10px;
}
.draft-send .send-block-hint { margin: 0; }

/* hidden属性は常に最優先で隠す（.ghost-button等の display 指定に負けないように） */
[hidden] {
  display: none !important;
}

.primary-button,
.secondary-button,
.ghost-button,
.ai-link {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary-button:disabled {
  border-color: #bfc9c4;
  background: #d8dfdb;
  color: #7d8984;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

/* 案A ニュートラル（claude-303）：非primaryの既定。淡グレー地＋見える枠で、白カードに溶けず「押せる」と一目で分かる。
   タッチにはホバーが無いので平常時からボタンの顔をさせる（矢野decision 2026-07-09）。tealは主役=primaryだけに残す。 */
.ghost-button,
.ai-link {
  border: 1px solid transparent;
  background: #e5f8f2;
  color: var(--ink);
  font-weight: 700; /* 900は日本語が寸胴に詰まる＝脇役ボタンは軽く。主役(primary)は太いままでメリハリ（矢野 2026-07-09） */
}

/* ホバー/押下は「地を差し替える」でなく「今の地を少し暗くする」＝ghost派生でteal/rose塗りのボタン(cd-reconnect等)でも
   地の色が化けず白文字が読める（矢野FB 2026-07-09・ミント地がcd-reconnectに競り勝つ副作用を根治）。 */
.ghost-button:hover,
.ai-link:hover {
  filter: brightness(0.96);
}

.ghost-button:active,
.ai-link:active {
  filter: brightness(0.92);
}

/* 問題は「白ボタン」でなく「白背景の上の白ボタン」＝コントラスト不足（矢野 2026-07-09）。
   色付きヘッダーの上に載る topbar（My QR / ⚙）は白で映えるので白に戻す。白カード上のボタンだけがミント塗り。 */
.topbar-actions .ghost-button { background: #fff; }
[data-skin="glass"] .topbar-actions .ghost-button { background: #fff; }

/* 口調チップは5個（自然/丁寧/短め/また会う/主催・出展）＝4列だと5個目が細い2段目に落ちて
   「主催・出展」がチップ内で2行に折れる。3列（3+2）なら全チップ1行で収まる（claude-361）。 */
.tone-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.tone-button,
.status-button {
  min-height: 42px;
  padding: 9px 10px;
  text-align: center;
  font-size: 13px;
}

/* チップ内で文字を折らない（自動翻訳言語だけ body.i18n-translated 側で wrap に戻す） */
.tone-button { white-space: nowrap; }

/* 下書き画面「文が先、直すのは手紙の順」（claude-251・矢野設計） */
.draft-box-main { margin: 4px 0 18px; }
/* タップの結果フラッシュ：画面下（タブバーの上）に一瞬出る */
.draft-flash {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom) + 86px);
  z-index: 40;
  border: 0;
  border-radius: 12px;
  background: rgba(18, 34, 30, 0.94);
  color: #fff;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 24, 21, 0.35);
}
.draft-flash[hidden] { display: none; }
.undo-manual-button { margin-top: 8px; font-size: 13px; padding: 8px 14px; }
.draft-bands-head {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 850;
  color: var(--accent-dark, #0b5f59);
}
.draft-band {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}
.band-label { margin: 0 0 6px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
/* どこで会った＝手入力欄（claude-300）。下のチップ（最近＋定番）は既存 .choice-button を流用。 */
.event-place-input { width: 100%; box-sizing: border-box; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: 0 0 8px; }
.event-place-input:focus { outline: none; border-color: #9cc3ba; }
.choice-button.recent-place, .memo-chip.recent-place { border-style: dashed; } /* 最近の場所＝自分が打った所を破線で区別（下書き側・撮る側とも） */
.band-echo {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--accent-dark, #0b5f59);
  background: rgba(230, 243, 240, 0.6);
  border-radius: 8px;
  padding: 7px 10px;
}
.band-echo.is-empty { color: var(--muted); background: rgba(0, 0, 0, 0.03); }
.band-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.band-echo { white-space: pre-line; } /* 話したこと＝複数の専用文を行で見せる */
/* 帯の中の区画（今回載せるもの）＝チップとリンクを visually 分ける（矢野FB 7/3） */
.band-subblock {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(15, 118, 110, 0.35);
  border-radius: 10px;
  background: #fff;
}
.band-sublabel { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; color: var(--accent-dark, #0b5f59); }
/* 折りたたみ：動詞ラベル＋全幅＝押せる行為だと読ませる */
.draft-fold-button {
  width: 100%;
  min-height: 44px;
  margin: 0 0 12px;
  border: 1.5px solid var(--accent, #0f766e);
  background: #fff;
  color: var(--accent-dark, #0b5f59);
  font-weight: 800;
}
.draft-fold-button[aria-expanded="true"] { background: var(--accent-soft, #e6f3f0); }
.draft-fold-box {
  margin: -4px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 14px;
}
.draft-fold-box[hidden] { display: none; }

.draft-builder {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.line-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.line-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.line-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.line-option {
  min-height: 64px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.material-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.material-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;
}

.material-item.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.material-item.is-disabled {
  opacity: 0.58;
}

.material-check {
  min-width: 0;
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  cursor: pointer;
}

.material-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.material-check span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.material-check strong,
.material-check small {
  overflow-wrap: anywhere;
}

.material-check small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.icon-text-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.send-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.send-flow {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.send-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfcfb;
}

.send-step-title {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.ai-link-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ai-link-row .ai-link {
  min-height: 44px;
  padding: 0 8px;
  font-size: 13px;
}

.status-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.contact-log {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.contact-log-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.contact-log-item:not(:has(.log-card-image)) {
  grid-template-columns: 1fr;
}

.log-card-image {
  width: 58px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
}

.log-copy {
  min-width: 0;
}

.virtual-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  min-width: 0;
  padding: 18px 16px;
  background: #fbfcfb;
}

.compact-heading {
  margin-bottom: 0;
}

.virtual-card-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), transparent 48%),
    #fff;
  aspect-ratio: 1.72;
  touch-action: pan-y;
  min-width: 0;
}

.virtual-name {
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 950;
}

.virtual-role {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: pre-line; /* 肩書きの改行を表示に反映（claude-249） */
}

/* 肩書き入力：見た目は1行だが改行できる textarea。自動で高さが伸びる（JSでscrollHeight）。 */
.virtual-role-input {
  resize: none;
  overflow: hidden;
  min-height: 2.6em;
  line-height: 1.4;
}

.virtual-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.virtual-links span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.qr-box {
  width: 116px;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.qr-side {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.qr-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.qr-box svg {
  width: 104px;
  height: 104px;
}

.qr-box p {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.virtual-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.virtual-actions {
  display: grid;
}

.show-card-main-button {
  min-height: 54px;
  font-size: 16px;
}

.qr-switcher {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  scrollbar-width: none;
}

.qr-switcher::-webkit-scrollbar {
  display: none;
}

.qr-switch-button {
  flex: 0 0 auto;
  max-width: 148px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
  padding: 0 12px;
  cursor: pointer;
}

.qr-switch-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.qr-switch-button.is-empty {
  color: #a8b2ad;
}

.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.contact-log ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.contact-log li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.contact-log li strong,
.contact-log li span {
  display: block;
}

.contact-log li span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.empty-log {
  color: var(--muted);
  font-size: 13px;
}

/* 初回（連絡先0人）の空状態＝中央・1アクション。説明とサンプルもここに集約。 */
.contacts-empty {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 14px;
  padding: 30px 22px 24px;
}
.contacts-empty-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 10px 24px rgba(14, 141, 124, 0.10);
}
.contacts-empty-mark::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 4px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-24deg);
}
.contacts-empty-mark span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  right: 12px;
  bottom: 12px;
}
.contacts-empty-title { margin: 0; font-size: 20px; font-weight: 900; color: var(--ink); line-height: 1.35; }
.contacts-empty-sub {
  margin: 0; max-width: 34ch;
  color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.6;
}
.contacts-empty-add { align-self: flex-start; min-height: 48px; padding: 0 22px; margin-top: 2px; }
.contacts-empty-sample {
  align-self: flex-start;
  border: none; background: transparent; cursor: pointer;
  color: var(--accent-dark); font-family: inherit;
  font-size: 13px; font-weight: 800; text-decoration: underline;
  padding: 6px;
}

/* 連絡先の「未フォロー◯人」バッジ＋絞り込みタブ（足すだけ・既定はall＝従来表示） */
.follow-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 12px;
}
.follow-bar[hidden] { display: none; }
.follow-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}
.follow-count[hidden] { display: none; }
.follow-count-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

/* Lab A案：未送信を一覧の複製にせず、一人だけに集中するフォロー画面。
   本体のpanel / button / hairlineを使い、密度と余白の切替で「行動する画面」だと伝える。 */
.follow-focus-panel {
  grid-column: span 2;
  width: min(680px, 100%);
  justify-self: center;
  overflow: hidden;
}
.follow-focus-heading { align-items: center; }
.follow-focus-sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.follow-focus-count {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.follow-focus-stage {
  min-height: 510px;
  display: grid;
  align-items: stretch;
}
.follow-focus,
.follow-later,
.follow-complete,
.follow-empty {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.follow-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.follow-progress strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 11px;
}
.follow-kicker {
  margin: 28px 0 4px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
}
.follow-person-name,
.follow-later h3,
.follow-complete h3,
.follow-empty h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.follow-lead,
.follow-later > p:not(.follow-kicker),
.follow-complete > p:not(.follow-kicker),
.follow-empty > p:not(.follow-kicker) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.follow-person-shell {
  --person-color: #0e8d7c;
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--person-color) 38%, #b8d8cf);
  border-top: 6px solid var(--person-color);
  border-radius: 22px;
  padding: 13px;
  background: #e6f3ef;
  background: linear-gradient(145deg, color-mix(in srgb, var(--person-color) 17%, white), color-mix(in srgb, var(--person-color) 8%, white));
  box-shadow: 0 16px 34px color-mix(in srgb, var(--person-color) 16%, transparent);
}
.follow-person-shell-label {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: color-mix(in srgb, var(--person-color) 72%, #10231d);
}
.follow-person-shell-label span { font-size: 10px; font-weight: 950; letter-spacing: .08em; }
.follow-person-shell-label small { overflow: hidden; font-size: 9.5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.follow-person-shell .follow-lead { margin: 7px 4px 0; color: color-mix(in srgb, var(--person-color) 45%, #52615c); }
.follow-person-profile {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 15px;
  padding: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, .34);
  text-align: left;
  cursor: pointer;
}
.follow-person-profile:focus-visible,
.follow-card-preview:focus-visible { outline: 3px solid rgba(16, 150, 132, .28); outline-offset: 3px; }
.follow-person-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.follow-person-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.follow-person-copy small { margin-top: 2px; color: color-mix(in srgb, var(--person-color) 72%, #10231d); font-size: 10.5px; font-weight: 900; }
.follow-profile-arrow { flex: 0 0 auto; width: 22px; height: 22px; color: color-mix(in srgb, var(--person-color) 72%, #10231d); }
.follow-person-card {
  position: relative;
  margin-top: 13px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 9px 22px rgba(30, 36, 33, .08);
}
.follow-person-avatar {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background-position: center;
  background-size: cover;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}
.follow-person-avatar.has-face { color: transparent; }
.follow-recall { min-width: 0; }
.follow-recall.has-visual { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 14px; }
.follow-card-preview {
  min-width: 0;
  display: grid;
  gap: 7px;
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.follow-card-preview[hidden] { display: none; }
.follow-card-preview img {
  width: 100%;
  aspect-ratio: 1.58 / 1;
  display: block;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: contain;
  background: #edf3f1;
  box-shadow: 0 6px 15px rgba(30, 36, 33, .12);
}
.follow-card-preview span { font-size: 10.5px; font-weight: 850; }
.follow-card-preview b { margin-left: 3px; }
.follow-memory { min-width: 0; margin: 0; }
.follow-memory > div { display: grid; gap: 4px; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.follow-memory > div:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.follow-memory dt { color: var(--muted); font-size: 10.5px; font-weight: 850; }
.follow-memory dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.follow-no-memory { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.follow-draft-chip {
  display: inline-flex;
  margin-top: 11px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 10.5px;
  font-weight: 850;
}
.follow-actions {
  margin-top: 15px;
  border: 1px solid #dce5e1;
  border-radius: 18px;
  padding: 13px;
  background: #f2f6f4;
}
.follow-actions-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 10px;
}
.follow-actions-label strong { color: var(--accent-dark); font-size: 10.5px; font-weight: 950; letter-spacing: .08em; }
.follow-actions-label span { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.follow-primary { width: 100%; min-height: 58px; margin-top: auto; font-size: 15px; }
.follow-primary span { margin-left: 8px; }
.follow-secondary { width: 100%; margin-top: 9px; }
.follow-actions .follow-primary {
  margin-top: 0;
  border: 1px solid #087a6d;
  background: #078f7e;
  box-shadow: 0 8px 18px rgba(7, 143, 126, .22);
}
.follow-actions .follow-secondary {
  border: 1px solid #e3c27e;
  color: #6f4d12;
  background: #fff1d5;
  box-shadow: none;
}
/* Glass共通のghost-button色より強く固定する。ここがミントへ戻ると「送る」と「あとで」の
   意味差が色で判別できず、実機で押し間違えやすくなる（Pixel確認・claude-544）。 */
[data-skin="glass"] .follow-actions .follow-secondary {
  border-color: #e3c27e;
  color: #6f4d12;
  background: #fff1d5;
}
.follow-skip {
  width: 100%;
  min-height: 42px;
  margin-top: 3px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.follow-later,
.follow-complete,
.follow-empty { justify-content: center; text-align: center; }
.follow-later-mark,
.follow-complete-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.follow-later-mark svg,
.follow-complete-mark svg { width: 29px; height: 29px; }
.follow-later .follow-kicker,
.follow-complete .follow-kicker,
.follow-empty .follow-kicker { margin-top: 15px; }
.follow-later-grid { margin: 22px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.follow-later-grid button {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.follow-later-grid button.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.follow-later-grid strong { font-size: 13px; }
.follow-later-grid span { color: var(--muted); font-size: 10.5px; }
.follow-complete-card {
  margin: 22px 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}
.follow-complete-card span { color: var(--muted); font-size: 11px; font-weight: 800; }
.follow-complete-card strong { color: var(--accent-dark); font-size: 34px; line-height: 1.1; }
.follow-complete-card small { color: var(--muted); font-size: 10.5px; }

/* Pixel Lab：フォローから入る文書作成。白いメール面で、選択した一文の入り先を見せる。 */
.follow-write-panel {
  grid-column: span 2;
  width: min(760px, 100%);
  justify-self: center;
}
.follow-write-stage { min-width: 0; }
.follow-write-top {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.follow-write-top button {
  justify-self: start;
  border: 0;
  padding: 6px 0;
  color: var(--accent-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.follow-write-top > strong { color: var(--ink); font-size: 13px; }
.follow-write-top > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.follow-write-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.follow-write-progress li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a9490;
  font-size: 10.5px;
  font-weight: 800;
}
.follow-write-progress li > span {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 10px;
}
.follow-write-progress li.is-current { color: var(--accent-dark); }
.follow-write-progress li.is-current > span,
.follow-write-progress li.is-done > span { border-color: var(--accent); color: #fff; background: var(--accent); }
.follow-write-heading { margin-bottom: 15px; }
.follow-write-heading > p {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .08em;
}
.follow-write-heading h2 { margin: 0; font-size: clamp(22px, 6vw, 30px); line-height: 1.3; letter-spacing: -.02em; }
.follow-write-heading > span { display: block; margin-top: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.follow-write-mail {
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(30, 36, 33, .08);
}
.follow-write-mail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #e9ece9;
  background: #fafbfa;
}
.follow-write-mail-head strong { color: var(--ink); font-size: 10.5px; letter-spacing: .03em; }
.follow-write-mail-head span { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.follow-write-mail-head i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
.follow-write-mail-subject {
  padding: 9px 12px;
  border-bottom: 1px solid #e9ece9;
  color: #52605b;
  font-size: 11px;
  font-weight: 750;
}
.follow-write-mail-body {
  min-height: 180px;
  padding: 14px 12px 17px;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  line-height: 1.78;
  white-space: pre-wrap;
}
.follow-write-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 13px;
  padding: 4px;
  border-radius: 10px;
  background: #eff2ef;
}
.follow-write-tabs button {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 7px 5px;
  color: #707b76;
  background: transparent;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
}
.follow-write-tabs button.is-done { color: var(--accent-dark); }
.follow-write-tabs button.is-current { background: #fff; box-shadow: 0 2px 7px rgba(30, 36, 33, .09); }
.follow-write-choices { display: grid; gap: 9px; }
.follow-write-choices button {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}
.follow-write-choices button i {
  width: 20px;
  height: 20px;
  border: 1.5px solid #bfc7c2;
  border-radius: 50%;
}
.follow-write-choices button.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.follow-write-choices button.is-selected i { border: 6px solid var(--accent); background: #fff; }
.follow-write-materials { display: grid; gap: 9px; }
.follow-write-material {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
  cursor: pointer;
}
.follow-write-material.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.follow-write-material.is-disabled { opacity: .55; cursor: default; }
.follow-write-material input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.follow-write-material > span { min-width: 0; display: grid; gap: 3px; }
.follow-write-material strong { font-size: 12.5px; }
.follow-write-material small { overflow-wrap: anywhere; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.follow-write-empty { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; font-size: 12px; line-height: 1.7; }
.follow-write-final { display: grid; gap: 12px; }
.follow-write-final label { display: grid; gap: 7px; }
.follow-write-final label > span { color: var(--ink); font-size: 12px; font-weight: 850; }
.follow-write-final input,
.follow-write-final textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  line-height: 1.75;
}
.follow-write-final textarea { min-height: 390px; resize: vertical; }
.follow-write-final input:focus,
.follow-write-final textarea:focus { border-color: var(--accent); outline: 3px solid rgba(15, 118, 110, .12); }
.follow-write-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 9px; margin-top: 18px; }
.follow-write-actions button { width: 100%; min-height: 52px; }
/* 連絡先フィルター。長い日本語/英語でも重ならないよう、必要なら自然に折り返す。 */
.follow-filter {
  display: flex;
  flex-wrap: nowrap; /* 1行。等幅で潰さず、入り切らなければ横スクロール（claude-332＝「何回か会った」+Proが切れる崩れの修正） */
  flex: 1 1 100%;
  min-width: 0;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 3px;
}
.follow-filter::-webkit-scrollbar { display: none; } /* スクロールバーは隠す（見た目はピル1本） */
.follow-tab {
  flex: 0 0 auto; /* 文字幅・縮めない＝ラベルが両側で切れない */
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  min-height: 42px; /* 44ptタッチターゲット（容器padding込みで~48px） */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 14px;
  color: var(--muted);
}
.follow-tab.is-on { background: var(--accent); color: #fff; font-weight: 700; }
.seasonal-nudge {
  display: block; width: 100%; text-align: left;
  margin: 10px 0 0; padding: 12px 14px;
  border: 1px solid var(--accent); background: var(--accent-soft);
  color: var(--accent-dark); border-radius: 14px;
  font-size: 13.5px; font-weight: 700; line-height: 1.5;
  cursor: pointer; font-family: inherit;
}
.seasonal-nudge[hidden] { display: none; }
/* 「見えるけどロック」：未所有のPro導線に付く小さな Pro バッジ（タップでペイウォール）。 */
.pro-locked { white-space: nowrap; } /* Proバッジが下に折り返さず必ず右に付く（文言レビュー7/3） */
.pro-locked::after {
  content: "Pro";
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: middle;
}
/* フィルタチップだけ Pro バッジを下段へ＝「何回か会った／(Pro)」の2行（claude-333・矢野案）。
   横幅が縮んでスマホでも4つ並ぶ／「まとめて下書き」チップと見た目も揃う。他のPro導線は右横のまま。 */
.follow-tab.pro-locked { flex-direction: column; gap: 2px; }
.follow-tab.pro-locked::after { margin-left: 0; }
/* 非JAは語が長い（Want to meet again 等）→ フィルタタブだけ少し小さく＝3分割でも収まる */
body.is-en .follow-tab,
body.i18n-translated .follow-tab { font-size: 11px; }

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(30, 36, 33, 0.34);
}

.settings-overlay[hidden] {
  display: none;
}

.settings-panel {
  width: min(900px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff; /* 設定は透けさせない（glassスキンの半透明 --panel を使わない） */
  box-shadow: 0 24px 70px rgba(30, 36, 33, 0.2);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

/* 設定の最下部にひっそり置くバージョン（ヘッダからはv表記を撤去・設定だけに） */
.settings-version {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .02em;
}

.settings-material-list {
  grid-template-columns: 1fr;
}

.virtual-show-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  /* 上寄せ＋水平中央。大きいカードでも「戻る」に被らず、あふれは下だけ（＝矢野拓実版の挙動） */
  place-items: start center;
  padding: calc(env(safe-area-inset-top) + 58px) 14px calc(env(safe-area-inset-bottom) + 24px);
  background: #0f1815;
  /* 内容が画面より高い端末では下のボタンが見切れるのでスクロール可能に（claude-238）。
     下スワイプ閉じは先頭(scrollTop 0)でのみ発火するので両立する。 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.virtual-show-overlay[hidden] {
  display: none;
}

/* ===== メモを足すシート（claude-203）：記憶カードを短く保つため、チップは下からふんわり出すボトムシートに ===== */
.cd-capture-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 24, 21, 0.42);
  animation: cdSheetFade 180ms ease;
}
.cd-capture-sheet[hidden] { display: none; }
@keyframes cdSheetFade { from { opacity: 0; } to { opacity: 1; } }
.cd-capture-panel {
  width: min(560px, 100%);
  max-height: min(80vh, calc(100vh - 48px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff; /* glassの半透明 --panel は使わない＝透けさせない */
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(env(safe-area-inset-bottom) + 18px);
  box-shadow: 0 -16px 50px rgba(15, 24, 21, 0.22);
  animation: cdSheetUp 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes cdSheetUp { from { transform: translateY(18px); } to { transform: translateY(0); } }
.cd-capture-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cd-capture-title { margin: 0; font-size: 15px; font-weight: 850; color: var(--ink); }
.cd-capture-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  min-height: 40px;
  cursor: pointer;
}
.cd-capture-done { width: 100%; margin-top: 8px; }

/* ===== A案v2（claude-210）：送るシート（旧「送信」画面をボトムシート化・タブ廃止） ===== */
.send-sheet {
  position: fixed;
  inset: 0;
  z-index: 52;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 24, 21, 0.42);
  animation: cdSheetFade 180ms ease;
}
.send-sheet[hidden] { display: none; }
.send-sheet-panel {
  width: min(560px, 100%);
  max-height: min(86vh, calc(100vh - 32px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 18px calc(env(safe-area-inset-bottom) + 18px);
  box-shadow: 0 -16px 50px rgba(15, 24, 21, 0.22);
  animation: cdSheetUp 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.send-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  position: sticky;
  top: 0;
  background: #fff;
  padding-top: 2px;
}
.send-sheet-title { margin: 0; font-size: 16px; font-weight: 850; color: var(--ink); }
.send-ai-details > summary { cursor: pointer; list-style: none; padding: 6px 0; }
.send-ai-details > summary::-webkit-details-marker { display: none; }
.send-sns-copy { width: 100%; margin-top: 8px; font-size: 13px; }

/* 書く画面フッター：送る＝主役、本文コピー＝脇 */
.draft-foot { display: grid; gap: 8px; margin-top: 14px; }
/* 会の絞り込み（claude-327・②③）：会ラベル＝押せる・絞り込み中はバーで現在地と出口 */
button.log-place-head { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; } /* font:inheritは全体リセット(button{font:inherit})に任せる＝.log-place-headの12px/800を潰さない（bugcheck#14） */
.log-place-go { float: right; color: #9aa09b; font-weight: 800; }
.place-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #eef4f2; border: 1px solid #cfe3dd; border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; list-style: none; }
.place-filter-info { font-weight: 800; color: #0b5f59; font-size: 13px; min-width: 0; }
.place-filter-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.place-filter-actions .ghost-button { padding: 6px 10px; font-size: 12px; }

/* 送るシートの「前回」バッジ（claude-326）＝前回使った送り口を次の既定に */
.send-last-badge { font-size: 10px; font-weight: 800; color: #0b5f59; background: #e6f3f0; border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: 1px; }
.draft-send-button { width: 100%; font-size: 16px; padding: 14px; }
.draft-copy-mini { width: auto; justify-self: center; font-size: 13px; padding: 6px 14px; color: var(--muted); }

/* ===== 交換の握手演出（claude-129）：読み取り成功時に「交換しました」を祝う ===== */
.exchange-celebrate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 24, 21, 0.55);
}
.exchange-celebrate[hidden] { display: none; }
.excel-card {
  position: relative;
  width: min(360px, 92vw);
  background: #fffdf8;
  border-radius: 22px;
  padding: 30px 22px 22px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.excel-check {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #0f766e;
  display: grid;
  place-items: center;
  margin: 0 auto;
  animation: excelPop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.excel-check svg { width: 52px; height: 52px; }
.excel-check svg path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: excelDraw 0.4s 0.22s ease-out forwards; }
.excel-title { margin: 16px 0 0; font-size: 20px; font-weight: 950; color: #1e2421; }
.excel-name { margin: 6px 0 0; font-size: 23px; font-weight: 950; color: #0f766e; word-break: break-word; }
.excel-sub { margin: 4px 0 0; font-size: 13px; color: #6b6b66; }
.excel-actions { margin-top: 20px; display: grid; gap: 9px; }
.excel-actions button[hidden] { display: none; }
/* 相手のSNSが複数なら、どれを見るか選べるチップ列に（1ボタンのギャンブルにしない・claude-229） */
.excel-sns { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.excel-sns[hidden] { display: none; }
.excel-sns-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #fff; color: var(--ink); font-weight: 800; font-size: 13px; cursor: pointer; }
.excel-burst { position: absolute; inset: 0; pointer-events: none; }
.excel-burst span {
  position: absolute;
  top: 46px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  opacity: 0;
}
.excel-burst span:nth-child(1) { background: #1d9e75; animation: excelConf1 0.9s 0.1s ease-out forwards; }
.excel-burst span:nth-child(2) { background: #ef9f27; animation: excelConf2 0.9s 0.12s ease-out forwards; }
.excel-burst span:nth-child(3) { background: #d4537e; animation: excelConf3 1s 0.1s ease-out forwards; }
.excel-burst span:nth-child(4) { background: #378add; animation: excelConf4 1s 0.14s ease-out forwards; }
.excel-burst span:nth-child(5) { background: #0f766e; animation: excelConf5 0.85s 0.16s ease-out forwards; }
.excel-burst span:nth-child(6) { background: #97c459; animation: excelConf6 0.95s 0.1s ease-out forwards; }
@keyframes excelPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes excelDraw { to { stroke-dashoffset: 0; } }
@keyframes excelConf1 { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(-90px, -34px) rotate(180deg); } }
@keyframes excelConf2 { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(86px, -28px) rotate(160deg); } }
@keyframes excelConf3 { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(-58px, 40px) rotate(-150deg); } }
@keyframes excelConf4 { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(64px, 46px) rotate(150deg); } }
@keyframes excelConf5 { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(-30px, -52px) rotate(120deg); } }
@keyframes excelConf6 { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(34px, -50px) rotate(-120deg); } }
@media (prefers-reduced-motion: reduce) {
  .excel-check, .excel-check svg path, .excel-burst span { animation: none; }
  .excel-check svg path { stroke-dashoffset: 0; }
}

/* 右上ピル列（編集＋戻る）＝固定でスクロールしても常に見える（claude-317） */
.virtual-show-topbtns {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 14px);
  right: 14px; /* 右上へ（名前と重ならない・claude-227） */
  z-index: 2;
  display: flex;
  gap: 8px;
}

.virtual-show-back {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 900;
}

/* 「編集」ピル（claude-317）：戻るの左隣・一段控えめな見た目（見せるが主役・編集は脇役） */
.virtual-show-edit {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.virtual-show-stage {
  width: min(420px, 100%);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* カードを縦中央に＝余白を上下対称にして「浮いた名刺」に */
  gap: 14px;
}

.virtual-show-card {
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 34px 30px 24px;
  color: #fff;
  background: linear-gradient(150deg, #14857c, #103b38);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  touch-action: pan-y pan-x;
}

.virtual-show-overlay[data-qr-theme="instagram"] .virtual-show-card {
  background: linear-gradient(135deg, #d62976, #8134af 52%, #f58529);
}

.virtual-show-overlay[data-qr-theme="x"] .virtual-show-card {
  background: linear-gradient(135deg, #111, #3b4652);
}

.virtual-show-overlay[data-qr-theme="youtube"] .virtual-show-card {
  background: linear-gradient(135deg, #ff0033, #6d111d);
}

.virtual-show-overlay[data-qr-theme^="material"] .virtual-show-card {
  background: linear-gradient(135deg, #315f8c, #0f766e);
}

.virtual-show-profile .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.virtual-show-profile h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(38px, 13vw, 58px);
  line-height: 0.98;
}

.virtual-show-profile > p {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: 800;
  white-space: pre-line; /* 肩書きの改行を表示に反映（claude-249） */
}

.virtual-show-profile .virtual-links span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.virtual-show-qr {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  /* QRを白パネルに載せて主役に＝スキャンされる前提の"見せ場" */
  background: #fff;
  border-radius: 20px;
  padding: 18px 18px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.virtual-show-qr .qr-box {
  width: min(200px, 58vw);
  min-height: min(200px, 58vw);
  border: 0;
  background: transparent;
}

.virtual-show-qr .qr-box svg {
  width: min(188px, 54vw);
  height: min(188px, 54vw);
}

.qr-caption {
  margin: 2px 0 0;
  color: var(--ink, #1e2421);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.virtual-show-qr .qr-label {
  color: var(--muted, #66736e);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 全部入りvCard表示中の「アプリ無しでもOK」ヒント（claude-129） */
.qr-hint {
  margin: 8px auto 0;
  max-width: 230px;
  color: var(--muted, #66736e);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}
.qr-hint:empty { display: none; }

/* カード下の控えめなブランド＝共有されるたびに名前が広がる"装置"（端末ロケールで CardCue/FollowCue） */
.vshow-brand {
  margin: 2px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 明るいMy QR色では文字を濃色へ自動で切り替え、名前・肩書きのコントラストを保つ。QR自体は白黒のまま。 */
.virtual-show-card.is-light-theme { color: #20251f; }
.virtual-show-card.is-light-theme .virtual-show-profile .eyebrow { color: rgba(32, 37, 31, .62); }
.virtual-show-card.is-light-theme .virtual-show-profile h2 { color: #20251f; }
.virtual-show-card.is-light-theme .virtual-show-profile > p,
.virtual-show-card.is-light-theme .virtual-show-profile .virtual-show-company,
.virtual-show-card.is-light-theme .virtual-show-profile .virtual-show-bio,
.virtual-show-card.is-light-theme .virtual-show-profile .virtual-show-contact { color: rgba(32, 37, 31, .8); }
.virtual-show-card.is-light-theme .vshow-brand { color: rgba(32, 37, 31, .58); }

.show-qr-switcher {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-inline: 0;
  overflow: visible;
}

.show-qr-switcher .qr-switch-button {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.show-qr-switcher .qr-switch-button.is-selected {
  background: #fff;
  color: var(--ink);
}

@media (orientation: landscape) and (max-height: 620px) {
  .virtual-show-overlay {
    padding: 14px 18px;
  }

  .virtual-show-topbtns {
    top: 12px;
    right: 12px;
  }

  .virtual-show-stage {
    width: min(920px, calc(100vw - 96px));
    gap: 10px;
  }

  .virtual-show-card {
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-template-rows: auto;
    max-height: min(72vh, 420px);
    min-height: auto;
    padding: 24px;
  }

  .virtual-show-profile h2 {
    font-size: clamp(36px, 6vw, 58px);
  }

  .virtual-show-profile > p {
    margin-bottom: 12px;
    font-size: 15px;
  }

  .virtual-show-qr .qr-box {
    width: 150px;
    min-height: 150px;
  }

  .virtual-show-qr .qr-box svg {
    width: 138px;
    height: 138px;
  }
}

/* CardCueはスマホ前提。PCでもこのスマホ幅レイアウトで統一する（min-width:0=常時適用） */
@media (min-width: 0px) {
  body {
    background: #f4f6f2;
  }

  /* ドキュメント自体は固定し、スクロールは内側(.app-shell)だけにする。
     ＝iOSの上下端ラバーバンド（固定背景の外＝素の色が帯になって出る崩れ）を根絶。
     実際のoverflowコンテナなら overscroll-behavior が iOS でも確実に効く。 */
  html, body { height: 100%; }
  body { overflow: hidden; }
  .app-shell {
    width: min(430px, 100%);
    height: 100vh;   /* 古いiOS用フォールバック（resize未対応の古い環境） */
    height: 100%;    /* resize:nativeがbody(=webView)をキーボード分すでに縮めるので、その100%に合わせる。
                        100svh/dvh(画面全高)だとwebViewより高くなり、下端に空白ギャップ＆二重リサイズ(点滅/黒帯)が出る（実機FB・claude-218）。
                        .app-shellはbody直下＝html,body{height:100%}なので100%が確実に効く。 */
    overflow-x: hidden; /* overflow-y:autoだけだと横も自動でスクロール可能になり、1pxのはみ出し×斜めスワイプで横ズレが固着する（実機FB・claude-246） */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    padding: 0;
  }

  .workspace {
    min-height: 100%;
    /* 下余白＝タブバー高さ(≈92px)＋ノッチ機のsafe-areaぶんも確保（claude-308）。固定92pxだと最大ノッチ機でCTA/送るが痩せる */
    padding: 0 12px calc(92px + env(safe-area-inset-bottom));
  }

  .topbar,
  .content-grid,
  .summary-band,
  .progress-band,
  .contact-form,
  .material-form,
  .virtual-form,
  .choice-grid,
  .choice-grid.compact,
  .tag-grid,
  .answer-row,
  .tone-tabs,
  .line-options,
  .material-list,
  .send-grid,
  .ai-link-row,
  .status-controls {
    grid-template-columns: 1fr;
  }

  .topbar,
  .content-grid {
    display: grid;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 -12px 12px;
    padding: calc(env(safe-area-inset-top) + 12px) 12px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    /* 不透明に＋backdrop-filter廃止：iOS WKWebViewでstickyヘッダーのblurがスクロール中カクつく(ビョンビョン)主因のため */
    background: #f4f6f2;
    border-bottom: 1px solid rgba(219, 225, 220, 0.8);
  }

  .topbar h1 {
    max-width: none;
    font-size: 12px;
    line-height: 1.25;
  }

  .brand-lockup {
    gap: 9px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 18px;
  }

  .brand-name {
    font-size: 18px;
  }

  .topbar-actions {
    display: flex;
    gap: 8px;
  }

  .topbar-actions .ghost-button {
    min-height: 38px;
    padding: 0 12px;
  }

  .status-pill {
    min-width: auto;
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 0 12px;
    font-size: 12px;
  }

  .summary-band {
    display: none;
  }

  .progress-band {
    position: sticky;
    top: 82px;
    z-index: 8;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 -2px 12px;
    padding: 0 2px 8px;
    background: #f4f6f2;
  }

  .progress-step {
    min-height: 6px;
    border-radius: 999px;
    border: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .progress-step.is-active {
    background: var(--accent);
  }

  .content-grid {
    gap: 12px;
  }

  .follow-focus-panel,
  .follow-write-panel,
  .material-picker-panel,
  .draft-panel,
  .contact-form label:last-child,
  .wide-label {
    grid-column: span 1;
  }

  .follow-focus-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .panel {
    display: none;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 10px 28px rgba(30, 36, 33, 0.08);
  }

  .panel.is-current-screen {
    display: block;
  }

  .self-card-panel.is-current-screen {
    display: flex;
    flex-direction: column;
  }
  /* 自分のQR画面：主役はカード（見せる＋編集）だけ。設定群（言語/デザイン/Pro/FB/バックアップ）は
     ⚙設定オーバーレイへ移設済み（claude-249）＝orderの並べ替えは不要になった。 */
  .self-card-panel.is-current-screen > .virtual-card { margin-bottom: 22px; }

  .section-heading {
    align-items: stretch;
    display: grid;
  }

  .draft-actions {
    justify-content: stretch;
  }

  .draft-actions button,
  .send-grid > * {
    width: 100%;
  }

  h2 {
    font-size: 18px;
  }

  .scan-frame {
    min-height: 190px;
    padding: 12px;
  }

  .capture-panel.is-current-screen {
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .capture-panel .section-heading {
    padding: 12px 14px 10px; /* 見出しの左右をボタンの文字(14px inset)と揃える＝見出しだけ端に張り付く「左に寄りすぎ」を解消（矢野 2026-07-09） */
    margin-bottom: 0;
  }

  .capture-panel .camera-preview {
    /* 名刺プレビューをtopバーの下に固定＝OCR結果と見比べられる。背後のフォームは不透明背景＋パネル幅いっぱいで完全に隠す（すり抜けて見えないように） */
    position: sticky;
    top: calc(env(safe-area-inset-top) + 64px);
    z-index: 5;
    margin: 0 -14px;
    padding: 8px 14px 10px;
    background: #f4f6f2;
  }

  .capture-panel .scan-frame {
    min-height: 210px;
    max-height: 30vh;
  }

  .capture-panel .scan-frame img {
    max-height: 28vh;
  }

  .capture-sheet {
    margin: 0 -2px;
    padding: 12px 12px 24px;
    border: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 30px rgba(30, 36, 33, 0.08);
  }

  .capture-sheet::-webkit-scrollbar {
    display: none;
  }

  .sheet-handle {
    width: 42px;
    height: 5px;
    border-radius: 999px;
    display: block;
    justify-self: center;
    background: #cfd7d1;
  }

  .capture-actions {
    grid-template-columns: 1fr;
  }

  .business-card {
    padding: 18px;
  }

  .card-name {
    font-size: 25px;
  }

  .contact-form,
  .material-form,
  .choice-grid,
  .choice-grid.compact,
  .answer-row,
  .line-options,
  .send-grid,
  .status-controls {
    gap: 10px;
  }

  .choice-button,
  .answer-button,
  .line-option,
  .material-item {
    min-height: 54px;
  }

  .tone-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tone-tabs::-webkit-scrollbar {
    display: none;
  }

  .tone-button {
    min-width: 78px;
  }

  .draft-builder {
    gap: 10px;
  }

  .line-block {
    padding: 10px;
  }

  #bodyOutput {
    min-height: 360px;
  }

  .mobile-tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 12;
    width: min(430px, 100%);
    transform: translateX(-50%);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr; /* 実際のタブ数で均等割り（3でも4でも左に寄らない・claude-210） */
    gap: 4px;
    padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px);
    border-top: 1px solid rgba(219, 225, 220, 0.9);
    background: #ffffff;
    box-shadow: 0 -10px 30px rgba(30, 36, 33, 0.08);
    transition: transform 160ms ease;
  }
  /* キーボード表示中は下部ナビ＋緑CTAを全部消す＝入力フォームを邪魔しない（実機FB・claude-215） */
  html[data-keyboard-open="1"] .mobile-tabbar {
    transform: translateX(-50%) translateY(130%);
    pointer-events: none;
  }
  /* ※in-flowの保存/送る（.capture-save-actions=claude-311・.contact-detail-actions/.draft-foot=claude-360 矢野7/15実機FB
     「入力しながら保存できたほうがいい」）はキーボード中も出す＝フォーム末尾の通常フローで入力を邪魔しない。
     隠すのは fixed のタブバーとヒーロー上の操作だけ（claude-215の趣旨は維持）。 */
  html[data-keyboard-open="1"] .cd-memory-hero-actions {
    display: none;
  }
  /* 保険：data-keyboard-open がiOSで遅れる/取れない時も、入力フォーカス中は固定UIを退かす（:has対応ブラウザ） */
  html:has(input:focus) .mobile-tabbar,
  html:has(textarea:focus) .mobile-tabbar {
    transform: translateX(-50%) translateY(130%);
    pointer-events: none;
  }
  html:has(input:focus) .cd-memory-hero-actions,
  html:has(textarea:focus) .cd-memory-hero-actions {
    display: none;
  }

  .tabbar-button {
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }
  .tabbar-button .tab-ic { width: 22px; height: 22px; }

  .tabbar-button.is-selected {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .settings-overlay {
    align-items: stretch;
    padding: 0;
    background: #fff; /* 全画面・不透明 */
  }

  .settings-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom)); /* iOSのホームバー/ノッチを避ける */
  }

  .virtual-show-overlay {
    padding: 58px 12px 18px;
  }

  .virtual-show-stage {
    width: 100%;
  }

  .virtual-show-card {
    gap: 22px;
    padding: 32px 26px 22px;
    border-radius: 26px;
  }

  .virtual-show-profile h2 {
    font-size: clamp(34px, 11vw, 50px);
  }

  .virtual-show-profile > p {
    margin-bottom: 12px;
    font-size: 15px;
  }

  .virtual-show-qr .qr-box {
    width: min(220px, 62vw);
    min-height: min(220px, 62vw);
  }

  .virtual-show-qr .qr-box svg {
    width: min(200px, 56vw);
    height: min(200px, 56vw);
  }

  .virtual-card {
    border-radius: 14px;
    padding: 12px;
  }

  .virtual-card-preview {
    grid-template-columns: minmax(0, 1fr) 92px;
    padding: 12px;
  }

  .virtual-name {
    font-size: 20px;
  }

  .qr-box {
    width: 92px;
    min-height: 92px;
  }

  .qr-box svg {
    width: 84px;
    height: 84px;
  }

}

/* ===== Claude改良版の追加スタイル ===== */
/* 連絡先一覧：名刺サムネ（IndexedDB復元）＋ボタン群（C2） */
.contact-log li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.log-thumb {
  width: 56px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
  background: #f0efe9;
}

.log-text {
  min-width: 0;
}

.log-actions {
  display: flex;
  gap: 8px;
}

/* 一時トースト通知（ステータスピルとは分離）: C8 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(8px);
  z-index: 60;
  max-width: min(92vw, 520px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* リンクエディタ（自分タブ：統合リンク一覧） */
.link-editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.link-editor-hint {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}
/* 自分のQR画面のヒントは、オンボカードと揃えて薄い青に（claude-132・#6） */
.self-card-panel .link-editor-hint { color: #5b7c86; }
/* 保存状態の表示（保存しました ✓ / 自動保存しました ✓）＝安心感（claude-132・#8） */
#cardSaveStatus { color: #0f766e; font-weight: 800; }
.link-editor {
  display: grid;
  gap: 10px;
}
.link-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}
.link-row.just-added {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: link-pop 0.3s ease;
}
@keyframes link-pop {
  0% {
    transform: scale(0.98);
  }
  60% {
    transform: scale(1.012);
  }
  100% {
    transform: scale(1);
  }
}
.link-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.link-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--accent);
}
.capture-back-button { align-self: flex-start; margin-bottom: 10px; }

/* US(en)=連絡先保存ファースト。jaは一切影響なし（body.is-enはen時のみ付与）。 */
.card-scan-toggle { display: none; }
body.is-en .card-scan-toggle { display: inline-flex; align-self: flex-start; margin-bottom: 12px; }
/* enの連絡先入力画面：名刺カメラ/OCRは既定で隠し、トグル(.reveal-card)で開く＝フォーム主役 */
body.is-en .capture-panel:not(.reveal-card) .camera-preview,
body.is-en .capture-panel:not(.reveal-card) .capture-actions,
body.is-en .capture-panel:not(.reveal-card) .ocr-box,
body.is-en .capture-panel:not(.reveal-card) #ocrStatusText { display: none !important; }
/* LinkedIn/Social欄をフォーム先頭へ */
body.is-en .contact-form label:has(#contactSnsInput) { order: -1; }
/* 連絡先入力の上部クラッター削減：名刺時代の「New card/Sample scan」はenでは隠す（フォームに集中） */
body.is-en .capture-panel .log-actions { display: none; }
/* 「← Exchange」は浮いた箱をやめ控えめなテキストリンクに（戻る＝ナビと分かる） */
body.is-en .capture-back-button { background: transparent; border: none; box-shadow: none; padding: 2px 2px; font-size: 14px; opacity: .72; align-self: flex-start; }
/* 「Scan a business card」は全幅・中央のアウトラインボタン（"+ Adjust context"と同じ作法＝意図的に見せる） */
body.is-en .card-scan-toggle { width: 100%; justify-content: center; text-align: center; }

/* 「手入力で追加」＝フォーム先の新画面（claude-303・矢野 2026-07-09）。名刺の撮影chromeは畳み、
   「かわりに名刺を撮る」トグルで開ける＝手入力なのに名刺画面に相乗り、を解消。言語非依存（enの作法を一般化）。 */
.capture-panel.manual-first .card-scan-toggle { display: inline-flex; align-self: flex-start; width: 100%; justify-content: center; text-align: center; margin-bottom: 12px; }
.capture-panel.manual-first:not(.reveal-card) .camera-preview,
.capture-panel.manual-first:not(.reveal-card) .capture-actions,
.capture-panel.manual-first:not(.reveal-card) .ocr-box,
.capture-panel.manual-first:not(.reveal-card) #ocrStatusText { display: none !important; }
.capture-panel.manual-first .log-actions { display: none; }
/* 手入力(manual-first)のときだけ「名前だけでもOK」の事実文を出す＝身構えを解く（claude-308・名刺を撮る導線には出さない） */
.capture-name-hint { display: none; font-size: 12px; color: #0b5f59; margin: -2px 0 8px; line-height: 1.6; }
.capture-panel.manual-first .capture-name-hint { display: block; }
/* My QRを渡した後の「申請が来る→相手のリンクを貼る」はSNS欄から始める。
   同じ標準フォームの並びだけを変え、連絡先の＋追加は従来どおり氏名から始める（claude-535）。 */
.capture-sns-hint { display: none; grid-column: 1 / -1; font-size: 12px; color: #0b5f59; margin: -4px 0 4px; line-height: 1.6; }
.capture-panel.sns-first .contact-form label:has(#contactSnsInput) { order: -2; grid-column: 1 / -1; }
.capture-panel.sns-first .capture-sns-hint { display: block; order: -1; }
.capture-panel.sns-first .capture-name-hint { display: none; }
/* トーンタブ：4等分だと長語(Professional/Profesional等)が崩れる → 日本語以外は2×2で全部見える */
body.is-en .tone-tabs,
body.i18n-translated .tone-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-x: visible; }
body.i18n-translated .tone-button { white-space: normal; line-height: 1.2; }

/* === US(en) 削りパス：静かに上質へ。jaは不変（body.is-enはen時のみ） === */
/* 上部の説明バンド（プロト説明）は製品の顔に不要 → 撤去 */
body.is-en .summary-band { display: none; }
/* 4ステップ進行バーは連絡先ファースト導線と噛み合わない＋ノイズ → 撤去 */
body.is-en .progress-band { display: none; }
/* 各画面トップの小見出し(eyebrow)はh2と重複 → 消す（Links/Design/Backup等のサブ見出しは残す） */
body.is-en .panel > .section-heading .eyebrow { display: none; }
/* 版数スタンプは検証用に残すが控えめに */
body.is-en .app-version { opacity: .4; font-weight: 600; }

/* スキャン結果「Add to People」追加済みの色変化（その場で追加が分かる・画面遷移しない） */
#scanSaveButton.is-added { background: #14524c; color: #bfe3dd; }

/* 設定内：表示言語の切替 */
.lang-switch { margin: 0 0 20px; }
.lang-switch-label { font-size: 12px; font-weight: 800; opacity: .7; margin: 0 0 8px; }
.lang-switch-buttons { display: flex; gap: 8px; }
.lang-btn { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid rgba(0,0,0,.15); background: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.lang-btn.is-active { background: #0f766e; color: #fff; border-color: transparent; }
/* Exchangeチューザー：Add a contact を先頭、次に Scan their QR */
body.is-en #exCaptureButton { order: -2; }
body.is-en #exScanButton { order: -1; }
.link-row[data-link-theme="linkedin"] .link-dot { background: #0a66c2; }
.link-row[data-link-theme="instagram"] .link-dot { background: #d62976; }
.link-row[data-link-theme="x"] .link-dot { background: #111; }
.link-row[data-link-theme="youtube"] .link-dot { background: #ff0033; }
.link-row[data-link-theme="discord"] .link-dot { background: #5865f2; }
.link-row[data-link-theme="youtrust"] .link-dot { background: #ff5f5f; }
.link-row[data-link-theme="material"] .link-dot { background: var(--blue); }
/* 「＋追加」の型ピッカー（同じSNSをもう1つ／自由リンク）＝claude-342 */
.add-account-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.add-account-picker[hidden] { display: none; }
.add-account-chip { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid #d8e2dc; background: #fff; color: #3c443f; font: inherit; font-size: 13px; font-weight: 800; padding: 7px 13px; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.add-account-chip:active { background: #f0f4f1; }
.add-account-chip[data-link-theme="linkedin"] .link-dot { background: #0a66c2; }
.add-account-chip[data-link-theme="instagram"] .link-dot { background: #d62976; }
.add-account-chip[data-link-theme="x"] .link-dot { background: #111; }
.add-account-chip[data-link-theme="youtube"] .link-dot { background: #ff0033; }
.add-account-chip[data-link-theme="discord"] .link-dot { background: #5865f2; }
.add-account-chip[data-link-theme="youtrust"] .link-dot { background: #ff5f5f; }
.add-account-chip[data-link-theme="material"] .link-dot { background: var(--blue); }
.link-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 850;
  color: var(--ink);
}
.link-title-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  font-size: 16px; /* iOS自動ズーム回避（claude-246） */
  font-weight: 800;
}
.link-toggle {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: #f3f5f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.link-toggle.is-on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
/* 自己紹介の「リンクに載せる」トグル（claude-233・中央＋押せると分かる輪郭ボタン／長い説明は廃止） */
.bio-share-row { display: flex; justify-content: center; margin-top: 12px; }
.bio-share-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; font-size: 13px; border-width: 1.5px; }
/* OFF(白)でも「押せるボタン」と分かる：白地＋teal枠＋teal文字＋淡い影 */
.bio-share-toggle:not(.is-on) { background: #fff; border-color: var(--accent); color: var(--accent); box-shadow: 0 1px 5px rgba(15, 118, 110, 0.14); }
.link-del {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.link-url {
  font-size: 16px; /* 16px未満はiOSがフォーカスで自動ズーム→拡大固着（パートナー実機FB 7/2・claude-249。基本ルールと同じ理由） */
}

/* ② 全部同じID → まとめて入れる */
.same-handle-trigger { margin: 2px 0 12px; font-size: 13px; }
.same-handle-panel {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.same-handle-lead { font-size: 12.5px; color: var(--ink); line-height: 1.65; }
#sameHandleInput {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 16px; /* 16px未満はiOSがフォーカスで自動ズーム→拡大固着（S46が検出・claude-249） */
  color: var(--ink);
}
.same-handle-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.same-handle-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.same-handle-chip.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.same-handle-preview { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.same-handle-preview li { display: flex; align-items: baseline; gap: 10px; font-size: 12px; min-width: 0; }
.same-handle-pv-label { flex: 0 0 auto; font-weight: 800; color: var(--accent-dark); }
.same-handle-pv-url { flex: 1 1 auto; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.same-handle-actions { display: flex; gap: 10px; margin-top: 2px; }
.same-handle-actions .primary-button { flex: 0 0 auto; }

/* #16 共有：今回入れるリンクの一時選択チップ */
.share-include { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; justify-content: center; margin: 12px 0 2px; }
.share-include-lead { font-size: 12px; font-weight: 800; color: var(--muted); }
.share-include-chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.share-include-chip.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.find-guide-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 2px 0;
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* カードのデザイン（背景写真）＝作品をカードに */
.virtual-show-overlay .virtual-show-card.has-photo {
  background-image:
    linear-gradient(
      180deg,
      rgba(8, 12, 10, 0.6) 0%,
      rgba(8, 12, 10, 0.15) 34%,
      rgba(8, 12, 10, 0.2) 58%,
      rgba(8, 12, 10, 0.72) 100%
    ),
    var(--card-photo);
  background-size: cover;
  background-position: center;
}

/* 「QRの背景」の見本カード（#1・TSG FB「何が変わるか分からない」・claude-346）＝実カードは別画面なのでここで映す */
.design-preview { margin-bottom: 12px; }
.design-preview-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  border-radius: 14px;
  padding: 14px 14px 12px;
  min-height: 88px;
  color: #fff;
  background: linear-gradient(150deg, #14857c, #103b38); /* JSが選択に応じて上書き */
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.design-preview-card.has-photo { position: relative; }
.design-preview-card.has-photo::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.45)); /* 写真の上でも文字が読める */
}
.design-preview-card .dpv-body { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.design-preview-card .dpv-eyebrow { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.78); }
.design-preview-card .dpv-name { font-size: 17px; font-weight: 700; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-preview-card .dpv-qr {
  position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 6px;
  background:
    linear-gradient(#111 0 0) padding-box,
    #fff;
  background-image:
    repeating-linear-gradient(90deg, #111 0 3px, #fff 3px 6px),
    repeating-linear-gradient(0deg, #111 0 3px, #fff 3px 6px);
  background-blend-mode: multiply;
  border: 3px solid #fff;
}
.design-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.design-mode {
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}
.design-mode.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.design-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.design-set {
  flex: 1 1 auto;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}
.design-percard {
  display: grid;
  gap: 8px;
}
.design-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
}
.design-card-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}
.design-card-row .link-dot[data-link-theme="instagram"] {
  background: #d62976;
}
.design-card-row .link-dot[data-link-theme="x"] {
  background: #111;
}
.design-card-row .link-dot[data-link-theme="youtube"] {
  background: #ff0033;
}
.design-card-row .link-dot[data-link-theme="material"] {
  background: var(--blue);
}

/* QR切替時のカードめくり演出（トレカ/マッチングアプリ風）: 次のカードが回り込んで現れる */
@keyframes card-flip {
  0% {
    transform: perspective(1200px) rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: perspective(1200px) rotateY(0deg);
    opacity: 1;
  }
}

.virtual-show-card.is-switching {
  animation: card-flip 0.3s ease-out;
  transform-origin: center center;
  backface-visibility: hidden;
}

/* 自分カードの任意項目：会社名・屋号／自由記述 */
.virtual-form-wide {
  grid-column: 1 / -1;
}
.virtual-show-profile .virtual-show-company {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 850;
  color: rgba(255, 255, 255, 0.88);
}
.virtual-show-profile .virtual-show-bio {
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  white-space: pre-wrap;
}
.virtual-show-profile .virtual-show-contact {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}
.virtual-company {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}
.virtual-bio {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
}
/* メール・電話の行（claude-373）＝bioと同じ控えめトーン */
.virtual-contact {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

/* QR表示画面の「交換した相手を保存」ボタン */
.virtual-show-save {
  align-self: center;
  margin-top: 2px;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* 送る系（QRを画像で送る／リンクで送る）を横並びに揃える（claude-227・要素がガタつくのを整理） */
.virtual-show-sendrow {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}
.virtual-show-sendrow .virtual-show-link {
  align-self: auto;
  margin-top: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: 220px;
  padding: 0 14px;
  font-size: 14px;
}
/* リモートで「全SNSをリンクで送る」（claude-131）。提示画面のダーク背景で映えるteal。 */
.virtual-show-link {
  align-self: center;
  margin-top: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.35);
}

/* ===== 相手のQRを読む（スキャナ）===== */
.scan-entry-button {
  width: 100%;
  margin-top: 8px;
}

.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: #0c1411;
  color: #fff;
}
.scan-overlay[hidden] {
  display: none;
}
.scan-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
}
.scan-head .ghost-button {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 900;
}
.scan-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-weight: 900;
  font-size: 17px;
  white-space: nowrap;
  pointer-events: none;
}
.scan-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.scan-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scan-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(68vw, 280px);
  height: min(68vw, 280px);
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
}
.scan-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.scan-result {
  /* 結果表示中はカメラ枠が隠れるので、ここを可変＋スクロール領域に＝キーボードで下の入力欄が隠れても上げられる（claude-235） */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px calc(env(safe-area-inset-bottom) + 20px);
  background: #11201b;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.scan-result-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 800;
}
.scan-result-name {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
}
.scan-result-url {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  word-break: break-all;
}
.scan-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 14px;
}
.scan-result-links:empty { display: none; }
.scan-link-chip {
  border: none;
  background: #1d9e75;
  color: #fff;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.scan-link-chip:active { transform: translateY(1px); }
/* スキャン結果（ダーク背景）の「どこで／話したこと」タップチップ。緑アクセントで結果パネルと統一。 */
.scan-capture { margin: 2px 0 14px; text-align: left; }
.scan-capture[hidden] { display: none; }
.scan-capture-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
}
.scan-cap-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.scan-cap-chip {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.scan-cap-chip:active { transform: translateY(1px); }
.scan-cap-chip.is-selected {
  border-color: #1d9e75;
  background: #1d9e75;
  color: #fff;
}
/* ＋ひとことメモ（claude-234・普段は閉じてキーボードを出さない／押すと1行入力が開く） */
.scan-memo-toggle {
  border: 1px dashed rgba(255, 255, 255, 0.32);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
  min-height: 40px;
  cursor: pointer;
}
.scan-memo-toggle[hidden] { display: none; }
.scan-memo-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px; /* iOSの自動ズーム回避のため16px */
}
.scan-memo-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.scan-memo-input[hidden] { display: none; }
.scan-dup { margin: 0 0 4px; }
.scan-dup-note {
  font-size: 14px;
  font-weight: 800;
  color: #ffe2a8;
  margin: 0 0 12px;
  text-align: center;
}
.scan-dup-actions { display: flex; flex-direction: column; gap: 10px; }
.scan-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scan-result-actions .primary-button {
  grid-column: 1 / -1;
}

/* ===== 連絡先：静かな2行セル（左アバター｜名前+状態/サブ｜右クイック送信）===== */
.log-item { flex-wrap: nowrap; }
.log-item .log-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.log-line1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.log-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 16px; font-weight: 900;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-date {
  display: inline-flex;
  flex: 0 0 auto;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(227, 243, 239, 0.86);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.contact-log .log-line1 .log-status { margin-left: auto; flex: 0 0 auto; }
.contact-log li .log-sub {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0; color: var(--muted);
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-sub-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 右端の32pxまるアイコン＝1タップで下書きへ（全幅ボタンを廃止して行を軽く） */
/* 行内の書くボタン（旧✎→「書く」ピル）はclaude-421で撤去＝行は「誰か＋状態」だけ。書く道は長押し/カード上部ほか6本。 */
/* 行の長押しメニュー（claude-420） */
/* ★長押ししたときにiOSが文字を選択して「Copy / Look Up / Translate」のバーを出すのを止める（claude-436・実機FB）。
   -webkit-touch-callout だけでは選択そのものは止まらない＝user-select が必要だった。
   連絡先の行は読むだけで、文字を選ぶ用途が無いので選択を切って良い（検索欄などの入力は対象外）。 */
.log-item, .log-item * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.row-menu-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(20,24,22,0.18); }
.row-menu {
  position: fixed; z-index: 61; min-width: 208px;
  background: #fff; border: 1px solid var(--line, #e3e0d6); border-radius: 14px;
  box-shadow: 0 12px 34px rgba(20,24,22,0.18); padding: 6px; overflow: hidden;
}
.row-menu-name {
  font-size: 11.5px; font-weight: 800; color: #7a817b;
  padding: 8px 12px 6px; margin: 0; border-bottom: 1px solid var(--line, #e3e0d6);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-menu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  padding: 12px; font: inherit; font-size: 14.5px; font-weight: 700;
  color: var(--ink, #1e2421); border-radius: 10px;
}
.row-menu-item:active { background: var(--accent-soft); }
.row-menu-item.is-danger { color: #9c3a25; }
.contact-log li .log-badge {
  display: inline-block;
  width: auto;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}
.log-badge.is-mail { background: var(--accent-soft); color: var(--accent-dark); }
.log-badge.is-sns { background: #ede9fe; color: #5b21b6; }
/* 全幅レイアウト（前の見た目）に戻しつつ、塗りあり・線なし・文字色変更で「明確にボタン」と
   分かる見た目に＝誤タップを減らす。カード本体タップ＝詳細（JS側）は維持。 */
.log-write-button {
  flex: 1 1 100%;
  margin-top: 8px;
  border: none;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.log-write-button:active { opacity: 0.85; }

/* ===== 連絡先タブの見出し ===== */
.log-handle {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 800;
}
.log-item .log-text { cursor: pointer; }

/* ===== 連絡先カード（名刺＋SNS共存・編集）===== */
/* 連絡先カードは普通の画面（パネル）＝ドキュメントスクロール。position:fixedオーバーレイを廃止（iOSの背景透け/スクロール不能/二重の根治） */
.contact-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.contact-detail-title { margin: 0; font-weight: 900; font-size: 17px; }
/* 横スワイプでカード(body)が指追従でスライドする。はみ出しはここでクリップ（clipは縦スクロールに影響しない）。 */
.contact-detail-panel { overflow-x: clip; }
.contact-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 背景スクロールは overlayScrollGuard(JS) が touch/wheel を止める。bodyは一切いじらない＝iOSの二重表示・スクロール不能を回避 (#10) */

/* 連絡先カード：上部の「誰か」ヘッダー */
.cd-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 2px;
}
.cd-identity-avatar {
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  flex: 0 0 auto;
}
.cd-identity-text { flex: 1; min-width: 0; }
/* 名刺写真が端末から消えている時（claude-427）＝黒い箱にせず理由を書く */
.cd-memory-cell.is-lost { background: #f3f1ea; border: 1px dashed var(--line, #e3e0d6); display: grid; place-items: center; }
.cd-card-cell.is-lost { background: #f3f1ea; border: 1px dashed var(--line, #e3e0d6); display: grid; place-items: center; }
.cd-card-lost { margin: 0; padding: 12px; font-size: 12.5px; font-weight: 700; color: #8a5a1a; text-align: center; line-height: 1.6; }

/* 本名｜ニックネーム（claude-424）＝本名が主・ニックネームは従（細く小さく）。
   矢野2026-07-28「矢野拓実 ｜ニックネーム（任意）でいいのかも」。 */
.cd-identity-nick { font-weight: 700; font-size: 14px; color: var(--sub, #6b726e); }
.cd-identity-nick::before { content: "｜"; margin: 0 2px 0 4px; color: var(--faint, #9aa09b); font-weight: 400; }
.cd-identity-name {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
}
.cd-identity-sub {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.cd-identity-date {
  display: inline-flex;
  width: fit-content;
  margin: 8px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(227, 243, 239, 0.9);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
}
.contact-detail-panel .cd-identity-date {
  display: none;
}
.cd-identity-status {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.cd-identity-status.todo  { background: #fdecea; color: #a32d2d; }
.cd-identity-status.later { background: #fff3e0; color: #8a5a00; }
.cd-identity-status.done  { background: #eef4ec; color: #3b6d11; }
.cd-identity-status.skip  { background: #eef0ee; color: #6b726e; }
/* タップで状態を変えられる合図（キャレット）＋ピッカー（claude-259） */
.cd-identity-status { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cd-identity-status::after { content: "▾"; margin-left: 4px; font-size: 10px; opacity: .5; }
.cd-status-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 2px 0 4px; padding: 10px;
  background: #f7f6f0; border: 1px solid #e3e0d6; border-radius: 14px;
  animation: cdSheetFade 140ms ease;
}
.cd-status-picker[hidden] { display: none; }
.cd-status-opt {
  flex: 1 1 auto; min-height: 42px; padding: 8px 12px;
  border: 1px solid #d8d5c9; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 800; cursor: pointer;
}
.cd-status-opt.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }

.cd-memory-hero {
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(227, 243, 239, 0.98), rgba(255, 255, 255, 0.82) 62%),
    #fff;
  box-shadow: 0 14px 34px rgba(25, 45, 60, 0.10);
}
.cd-memory-hero-head,
.cd-memory-hero-foot,
.cd-memory-hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cd-memory-hero-kicker,
.cd-memory-hero-date,
.cd-memory-hero-label,
.cd-memory-hero-place,
.cd-memory-hero-next,
.cd-memory-hero-memo {
  margin: 0;
}
.cd-memory-hero-kicker {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}
.cd-memory-hero-date {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
}
.cd-memory-hero-main {
  display: grid;
  gap: 6px;
}
.cd-memory-hero-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.cd-memory-hero-memo {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.58;
  overflow-wrap: anywhere;
}
.cd-memory-hero-memo.is-empty {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}
.cd-memory-hero-place,
.cd-memory-hero-next {
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}
.cd-memory-hero-place {
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
}
.cd-memory-hero-next {
  background: rgba(14, 141, 124, 0.12);
  color: var(--accent-dark);
  text-align: right;
}
/* 主役「この人に書く」をフル幅で立て、「メモを足す」は小さい副次に＝初見で押すべきが1秒で分かる（#3） */
.cd-memory-hero-actions {
  flex-direction: column;
  align-items: stretch;
}
.cd-memory-hero-actions .primary-button {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
}
.cd-memory-hero-actions .ghost-button {
  align-self: center;
  flex: 0 0 auto;
  min-height: 0;
  padding: 7px 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--accent-dark);
}
.cd-reconnect-button {
  width: 100%;
  min-height: 54px;
  margin: 0;
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(14, 141, 124, 0.22);
}
.cd-reconnect-button::before {
  content: "↻";
  margin-right: 8px;
  font-weight: 900;
}
.cd-add-reunion-button {
  min-height: 50px;
  padding: 0 18px;
  background: rgba(227, 243, 239, 0.94);
  border: 1px solid rgba(15, 118, 110, 0.22);
  color: var(--accent-dark);
  border-radius: 18px;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(14, 141, 124, 0.10);
}

/* 「また会いたい」トグル（無料・優先印）。OFF=淡い枠／ON=ゴールド */
.cd-want-again {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.cd-want-again .cd-want-star { font-size: 15px; line-height: 1; color: #c9a227; }
.cd-want-again.is-on { background: #fdf6e3; border-color: #e6c34d; color: #8a6d12; }
/* 一覧の★（また会いたい） */
.log-want { color: #d9a400; font-size: 12px; }
/* 何回か会った（Pro）バッジ */
/* .contact-log li span { display:block } に勝つよう具体度を合わせる（バッジ類と同じ書き方）＝小さいpillに保つ */
.contact-log li .log-met { display: inline-block; vertical-align: middle; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
/* 再会・過去の出来事（Pro） */
.cd-reunion { margin: 6px 0 2px; }
.cd-reunion[hidden] { display: none; }
.cd-past-title { margin: 12px 0 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.cd-past-title[hidden] { display: none; }
/* grid列は minmax(0,1fr)＝中身が長くても列を縮められる。これが無いと列が max-content に膨らみ、
   下書き/履歴の長い行が詳細画面ごと横に広げてしまう（min-width:0 もアイテムに必須）。 */
.cd-past-list { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.cd-past-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--panel); min-width: 0; }
.cd-past-when { font-size: 11.5px; color: var(--muted); }
.cd-past-body { font-size: 13px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
/* 下書き履歴（複数下書き／どの出来事に書くか） */
.cd-draft-hist { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.cd-draft-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--panel); min-width: 0; }
/* 下書き履歴＝タップで全文を開く（claude-388・矢野FB「ここタップしたら前回何書いたかを全文読めたら」）。
   閉：1行に潰す（nowrapは改行も空白扱いにする）／開：pre-wrapで改行そのまま。開閉は属性だけ＝再描画なし。 */
.cd-draft-open { display: block; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cd-draft-tag { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.cd-draft-chev { flex: none; transition: transform 0.15s ease; }
.cd-draft-open[aria-expanded="true"] .cd-draft-chev { transform: rotate(180deg); }
.cd-draft-prev { display: block; font-size: 12.5px; color: var(--ink); margin: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-draft-open[aria-expanded="true"] .cd-draft-prev { overflow: visible; text-overflow: clip; white-space: pre-wrap; overflow-wrap: anywhere; }
.cd-draft-actions { display: flex; gap: 6px; }
.cd-draft-actions .ghost-button { padding: 5px 10px; font-size: 12px; }

/* 連絡先カード：折りたたみセクション (#9) */
.cd-section {
  border: 1px solid rgba(17, 35, 31, 0.12);
  border-radius: 16px;
  background: rgba(248, 252, 250, 0.94);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(25, 45, 60, 0.06);
}

/* 折りたたみは <details> をやめてJSトグル（基本のdisplay:noneのみ）＝iOS WKWebViewでも確実に隠れる */
.cd-summary {
  width: 100%;
  border: none;
  background:
    linear-gradient(90deg, rgba(227, 243, 239, 0.72), rgba(255, 255, 255, 0.78));
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 850;
  color: var(--ink);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cd-summary::after {
  content: "▸";
  color: var(--muted);
  font-size: 13px;
  transition: transform 160ms ease;
}

.cd-section.is-open > .cd-summary::after {
  transform: rotate(90deg);
}

.cd-section.is-open > .cd-summary {
  border-bottom: 1px solid var(--line);
}

.cd-section-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 14px;
  background: rgba(248, 252, 250, 0.70);
}

/* 閉じたら本文を隠す（class制御＝全webviewで同一挙動・空箱が残らない） */
.cd-section:not(.is-open) > .cd-section-body {
  display: none;
}

/* 音声メモ：複数（追加式） (#7) */
.cd-voice-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f7;
}

.cd-voice-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.cd-voice-add {
  align-self: stretch;
}

.cd-voice-trans {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.cd-voice-transcript {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}

.cd-voice-transstatus {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.contact-detail-photo {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #11201b;
}
.contact-detail-nophoto {
  margin: 0;
  padding: 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.cd-field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.cd-field > span {
  padding-left: 2px;
}
.cd-field input,
.cd-field textarea {
  width: 100%;
  box-sizing: border-box; /* paddingで横にはみ出さない（特にiOSの type=date が内容幅で膨らむ事故・claude-213） */
  min-width: 0;
  border: 1px solid rgba(17, 35, 31, 0.13);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 16px; /* iOS自動ズーム回避（claude-246） */
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.cd-field input[type="date"] { text-align: left; -webkit-appearance: none; appearance: none; }
.cd-field textarea {
  min-height: 120px;
}
.cd-field input:focus,
.cd-field textarea:focus,
.cd-link-row .cd-link-url:focus {
  outline: none;
  border-color: rgba(14, 141, 124, 0.44);
  box-shadow: 0 0 0 3px rgba(14, 141, 124, 0.12);
}
.cd-open-sns { width: 100%; }
.contact-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ===== 連絡先カード：SNS/リンク複数編集 ===== */
.cd-links { display: grid; gap: 10px; }
.cd-links-empty { margin: 2px 0; color: var(--muted); font-size: 13px; font-weight: 750; }
/* 1人のSNS/リンクを2段カードに：上＝公式ロゴ＋行き先＋操作、下＝URL欄を全幅（狭い画面でも潰れない） */
.cd-link-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}
.cd-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cd-link-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cd-link-brand {
  width: 40px;
  height: 40px;
  padding: 6px;
  border: 1px solid rgba(17, 35, 31, 0.1);
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
}
.cd-link-brand img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.cd-link-brand svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cd-link-brand[data-social-brand="x"] { background: #000; border-color: #000; }
.cd-link-brand[data-social-brand="x"] img { width: 16px; height: 16px; }
.cd-link-brand[data-social-brand="line"] { padding: 0; border: 0; }
.cd-link-brand[data-social-brand="line"] img { width: 40px; height: 40px; }
.cd-link-brand[data-social-brand="discord"] { background: #5865f2; border-color: #5865f2; }
.cd-link-brand[data-social-brand="discord"] img { width: 28px; height: 21px; }
.cd-link-brand[data-social-brand="linkedin"] img { width: 28px; height: 26px; }
.cd-link-brand[data-social-brand="youtube"] img { width: 30px; height: 26px; }
.cd-link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cd-link-account,
.cd-link-domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-link-account { color: var(--ink); font-size: 14px; font-weight: 850; }
.cd-link-domain { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.cd-link-brand:focus-visible {
  outline: 3px solid rgba(14, 141, 124, 0.22);
  outline-offset: 2px;
}
.cd-link-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.cd-link-row .cd-link-url {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px; /* 16px未満はiOSがフォーカスで自動ズーム→拡大固着（パートナー実機FB 7/2・claude-249） */
  font-weight: 650;
  border: 1px solid rgba(17, 35, 31, 0.13);
  border-radius: 10px;
  background: rgba(233, 243, 240, 0.72);
}
/* リンクの名前（任意）＝URL欄と同型・少し控えめ（claude-377） */
.cd-link-row .cd-link-title {
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 16px;
  font-weight: 650;
  border: 1px solid rgba(17, 35, 31, 0.1);
  border-radius: 10px;
  background: rgba(233, 243, 240, 0.5);
}
.cd-link-open {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.cd-link-del {
  border: 1px solid rgba(163, 45, 45, 0.24);
  background: #fff4f2;
  color: #a32d2d;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.cd-add-link {
  width: 100%;
  margin-top: 2px;
  background: rgba(227, 243, 239, 0.85);
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--accent-dark);
}

@media (max-width: 380px) {
  .cd-link-open { padding-inline: 10px; }
}

/* ===== 3タブ構成：交換パネル／ステップ帯ナビ／保存行 ===== */
.exchange-actions { display: grid; gap: 12px; }
.exchange-big {
  width: 100%;
  min-height: 60px;
  font-size: 17px;
  font-weight: 900;
  border-radius: 12px;
}
.send-save-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.send-save-row .primary-button,
.send-save-row .ghost-button { width: 100%; min-height: 48px; }

/* 上部ステップ帯＝作業フローのナビ（タップで移動） */
.progress-band[hidden],
.summary-band[hidden] { display: none; }
.progress-step { cursor: pointer; }
.progress-step.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ===== 連絡先：交換日ごとに静かな見出しでグループ化（枠なし＝iOS風）===== */
.contact-log li.log-group {
  list-style: none;
  display: block;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.contact-log li.log-group.is-today {
  border: none;
  background: transparent;
}
.log-group-head {
  margin: 14px 4px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.contact-log li.log-group:first-child .log-group-head { margin-top: 4px; }
.log-group.is-today .log-group-head {
  color: var(--accent-dark);
  font-size: 13px;
}
.log-group-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* 同日・同社から既存のまとめ下書きへ（Lab/TestFlight試作）。カードを増やさず、日付グループ内の操作行にする。 */
.company-followup-nudge {
  width: 100%; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 9px 4px 10px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.company-followup-copy { min-width: 0; display: grid; gap: 2px; }
.company-followup-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; }
.company-followup-copy small { color: var(--muted); font-size: 11.5px; }
.company-followup-action { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; color: var(--accent-dark); font-size: 12px; font-weight: 800; white-space: nowrap; }
.company-followup-action span { color: var(--muted); font-size: 18px; line-height: 1; }
/* ⑥ 同じ日に複数の場所がある時の「場所(場面)」小見出し＝あの場で会った人たちで思い出せる。 */
.log-place-head { font-size: 12px; font-weight: 800; color: var(--accent-dark); padding: 6px 2px 2px; opacity: 0.85; }
.log-place-head:first-child { padding-top: 0; }
/* 各人＝静かな白いカード（ページに直接並ぶ・1行に収める） */
.contact-log .log-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
/* 左スワイプ用：前景(fg)が指に追従して動き、後ろから赤い「送らない」が出る（claude-218） */
.contact-log .log-item-fg {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  transition: transform 180ms ease;
  will-change: transform;
}
.contact-log .log-dismiss-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 20px;
  background: #fdecec;
  color: #b3261e;
  font-size: 14px;
  font-weight: 850;
  border-radius: 12px;
}
.toast-undo {
  margin-left: 12px;
  border: none;
  background: transparent;
  color: #7ee0c3;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: underline;
}
.contact-log li .log-when {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff3e0;
  color: #9a5b00;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

/* ===== 工程バー一本化（DaVinci式）：上の帯を撤去し下バーを工程に ===== */
.summary-band, .progress-band { display: none !important; }
.draft-context-button {
  width: 100%;
  margin-bottom: 12px;
  line-height: 1.5;
  word-break: keep-all; /* 日本語を語の途中(調/整)で割らない＝区切り(・)で改行 */
  overflow-wrap: anywhere; /* 長すぎる時だけはみ出さず折る保険 */
  text-wrap: balance; /* 2行になる時は行長を均す（孤立した「整」を作らない） */
  border: 1px solid var(--accent); /* 白で見えない問題＝アクセント色で見える脇役に（claude-210） */
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ===== 送信画面＝この人に送る最終確認（#6）===== */
.send-recipient {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  margin-bottom: 14px;
}
.send-recipient-name { margin: 0; font-size: 19px; font-weight: 900; }
.send-recipient-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.send-recipient-meta { margin: 8px 0 0; color: var(--accent-dark); font-size: 12px; font-weight: 800; }

.send-draft {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfcfb;
  margin-bottom: 14px;
}
.send-draft > summary { color: var(--accent-dark); font-size: 13px; font-weight: 850; cursor: pointer; }
.send-draft-subject { margin: 10px 0 6px; font-weight: 900; font-size: 14px; }
.send-draft-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  max-height: 260px;
  overflow: auto;
}

.send-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  margin-bottom: 14px;
  display: grid;
  gap: 10px;
}
.send-block[hidden] { display: none; }
/* 送った直後の確認バー：最上部で目立たせ、押し忘れを防ぐ（claude-222） */
.send-sent-prompt {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid rgba(14, 141, 124, 0.35);
  background: var(--accent-soft, #e6f4f1);
}
.send-sent-prompt[hidden] { display: none; }
.send-sent-prompt-text { margin: 0; font-size: 15px; font-weight: 900; color: var(--accent-dark, #0b5f59); }
.send-block-title { margin: 0; font-size: 14px; font-weight: 900; }
.send-block-hint { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.5; }
.send-ai { display: grid; gap: 8px; padding-top: 4px; border-top: 1px dashed var(--line); }
.send-ai-title { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.send-sns-list { display: grid; gap: 8px; }
.send-sns-button {
  display: flex;
  align-items: center;
  justify-content: center; /* 中央寄せ＝業務ツール感を消す（claude-210） */
  gap: 8px;
  width: 100%;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.send-sns-button .link-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); flex: 0 0 auto; }
.send-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
.send-after > :first-child { grid-column: 1 / -1; } /* 送信済みにする＝1段目フル幅、要フォロー/送らないは下に2分割（崩れ修正・claude-210） */
.send-after button { width: 100%; min-height: 48px; text-align: center; }

/* ===== 送信：AIで整える1ボタン化＋空状態（Codexレビュー）===== */
.send-ai-buttons { display: grid; gap: 8px; }
.ai-open-button {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.ai-open-button:active { background: #f3f1ea; }
.send-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 28px 18px;
  text-align: center;
  background: #fff;
}
.send-empty[hidden] { display: none; }
.send-empty-title { margin: 0 0 6px; font-size: 16px; font-weight: 900; }
.send-empty-sub { margin: 0 0 16px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.6; }
.send-empty .primary-button { min-height: 48px; padding: 0 22px; }

/* ===== 名刺OCR後の「連絡先に追加」 ===== */
.add-card-button { width: 100%; margin-top: 14px; min-height: 50px; }

/* プライバシー/規約リンク（自分タブ末尾） */
.legal-links { margin: 18px 0 4px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.legal-links a { color: var(--accent-dark); text-decoration: underline; }

/* ===== 連絡先：送信ステータスの目立つバッジ（フォローの核） ===== */
.contact-log li .log-status {
  display: inline-block;
  width: auto;
  margin-left: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}
.log-status.todo  { background: #fdecea; color: #a32d2d; }   /* 未整理＝要対応 */
.log-status.draft { background: #e8f0fb; color: #1f5aa6; }   /* 下書き済み＝進行中 */
.log-status.later { background: #fff3e0; color: #8a5a00; }   /* 後日フォロー＝保留 */
.log-status.done  { background: #eef0ee; color: #6b726e; }   /* 送信済み＝完了（地味グレー＝落ち着いた既定。要対応だけが目立つ） */
.log-status.skip  { background: #eef0ee; color: #6b726e; }   /* 送らない＝対象外（地味グレー） */

/* 下書きあり＝送信ステータスとは別軸の小マーク */
.contact-log li .log-draft-mark { display:inline-block; width:auto; margin-left:4px; color: var(--accent-dark); font-weight:900; font-size:13px; vertical-align:middle; }

/* 連絡先の作成直後だけ出る顔写真導線。一覧の行は「誰か＋状態」のまま崩さない。 */
.contact-face-nudge {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  margin: 2px 0 12px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 14px;
  background: rgba(227, 243, 239, .62);
}
.contact-face-nudge[hidden] { display: none; }
.contact-face-nudge-mark {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, .2);
  color: var(--accent-dark);
  font-size: 21px;
  font-weight: 500;
}
.contact-face-nudge-copy { min-width: 0; }
.contact-face-nudge-copy strong { display: block; color: var(--ink); font-size: 13.5px; }
.contact-face-nudge-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.contact-face-nudge-actions { grid-column: 2; display: flex; align-items: center; gap: 8px; }
.contact-face-nudge-actions button { width: auto; padding: 7px 12px; font-size: 12px; }
.contact-face-nudge-actions .contact-face-later { border: 0; background: transparent; color: var(--muted); }

/* ===== 初回オンボーディング（C-lite）。初回起動のみ overlay で価値を体験させる。 ===== */
/* 配色は既存トークンを流用（モックと一致）。通信ゼロ・JP無傷・最前面に被せるだけ。 */
.onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 24px 14px calc(24px + env(safe-area-inset-bottom));
  background: var(--paper);
}
.onboard-overlay[hidden] { display: none; }
.onboard-stage { width: 100%; max-width: 360px; margin: auto; }

.onb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 0 14px; }
.onb-brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: #f7f5ee; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.onb-brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.onb-brand-name { font-weight: 600; font-size: 15px; line-height: 1; }
.onb-brand-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.onb-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; }
.onb-build.onb-card { padding: 14px; }
.onb-eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.onb-hero-title { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 8px 0 4px; }
.onb-hero-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }

.onb-sample { margin-top: 16px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px; background: #fcfbf6; }
.onb-sample-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.onb-sample-row { display: flex; gap: 10px; align-items: center; }
.onb-sample-card { flex: 0 0 92px; border-radius: 8px; background: #fff; border: 1px solid var(--line); padding: 7px 8px; }
.onb-sample-card .s-co { font-size: 8px; color: var(--muted); }
.onb-sample-card .s-name { font-size: 11px; font-weight: 600; margin-top: 2px; }
.onb-sample-card .s-role { font-size: 8px; color: var(--muted); margin-top: 1px; }
.onb-sample-card .s-link { font-size: 8px; color: var(--blue); margin-top: 3px; }
.onb-sample-note { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.45; }

.onb-cta {
  width: 100%; margin-top: 16px; background: var(--accent); color: #fff; border: none;
  border-radius: 12px; padding: 15px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.onb-cta:active { background: var(--accent-dark); }
.onb-hero-note { font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; margin-top: 10px; } /* #5・TSG FB：CTA直下の「My QRは後で」補足（claude-346） */
.onb-skip-link { width: 100%; margin-top: 8px; background: none; border: none; color: var(--muted); font-size: 12px; padding: 6px; cursor: pointer; }

/* What's New（アップデートの新機能・claude-354）＝Apple標準の「新機能」様式・モノクロ/hairline。目玉の所属だけ pi-qcard で動く */
.wn-card { padding: 20px 18px 18px; }
.wn-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--teal); text-transform: uppercase; }
.wn-title { font-size: 21px; font-weight: 800; line-height: 1.3; margin: 4px 0 14px; }
.wn-hero-wrap { margin: 0 0 18px; }
.wn-hero.pi-qcard { min-height: 84px; border-radius: 14px; }
.wn-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.wn-row:first-of-type { border-top: none; }
.wn-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); margin-top: 6px; }
.wn-text { min-width: 0; }
.wn-row-title { font-size: 14.5px; font-weight: 800; margin: 0 0 2px; }
.wn-row-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.wn-card .onb-cta { margin-top: 18px; }

.onb-build-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 12px; }
.onb-build-lead { font-size: 12px; color: var(--muted); line-height: 1.4; }
.onb-skip-persist { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; padding: 5px 12px; cursor: pointer; flex: 0 0 auto; }

.onb-line {
  display: flex; gap: 8px; padding: 9px 11px; border-radius: 9px;
  background: var(--accent-soft); border: 1px solid var(--accent); margin-bottom: 7px;
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease;
}
.onb-line.is-in { opacity: 1; transform: translateY(0); }
.onb-line-label { font-size: 10px; color: var(--muted); flex: 0 0 68px; padding-top: 2px; }
.onb-line-val { font-size: 12.5px; font-weight: 600; line-height: 1.4; flex: 1; }

.onb-final {
  display: block; background: none; border: none; padding: 0; margin: 10px 0 0;
  border-top: 1px solid var(--line); padding-top: 12px;
}
.onb-final-label { font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.onb-final-body {
  font-size: 12.5px; line-height: 1.65; color: var(--ink);
  background: #fcfbf6; border: 1px solid var(--line); border-radius: 9px; padding: 11px;
}

.onb-done { opacity: 0; transition: opacity .4s ease; margin-top: 14px; }
.onb-done.is-in { opacity: 1; }
.onb-done-tag { text-align: center; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }

.onboard-replay-row { margin-top: 12px; }

/* 言語ピッカー（9言語ドロップダウン） */
.lang-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
[data-skin="glass"] .lang-select { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--glassbrd); }

/* 翻訳フィードバック（ただし書き＋「正しい言い回しを教える」） */
.i18n-feedback-note { line-height: 1.55; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.i18n-feedback #i18nFeedbackButton { width: 100%; }

/* 連絡先の削除（詳細・編集セクション末尾の危険操作） */
.cd-delete-button { width: 100%; margin-top: 8px; color: #a32d2d; border-color: rgba(163, 45, 45, 0.35); }
.cd-section .cd-delete-button {
  background: #fff4f2;
  border-color: rgba(163, 45, 45, 0.28);
}
.cd-delete-button:active { background: rgba(163, 45, 45, 0.06); }

/* 視差効果を減らす設定では、積み上げアニメを切る（結論＝完成下書きはJS側で即時表示）。 */
@media (prefers-reduced-motion: reduce) {
  .onb-line, .onb-done { transition: none; }
}

/* ============================================================
   デザインスキン機構（claude-73）
   <html data-skin="..."> で見た目を丸ごと切替。トークン＋スコープCSSのみ＝
   DOM構造・折畳ロジックは不変（QA24本維持）。JSは app.js の skin スイッチャ。
   - 既定(data-skin無し / "classic") = 現行=本番デザイン（このブロックは効かない）
   - "glass" = ガラス＋teal「Apple純正系」
   新スキン追加は :root[data-skin="NAME"] と [data-skin="NAME"] ... を足すだけ。
   方針：fixed/sticky に backdrop-filter を乗せない（iOS WKWebView のスクロール
   カクつき＝既存対策を尊重）。frost はスクロールするカードだけ控えめに。
   ============================================================ */

/* 頭文字アバター＝各行の左に固定スキャン軸（写真サムネがあればそちらが優先で出る）。 */
.log-avatar {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

/* ---------- skin: glass ---------- */
:root[data-skin="glass"] {
  --paper: #e9f3f0;
  --ink: #11231f;
  --muted: #5d6b67;
  --line: rgba(17, 35, 31, 0.10);
  --panel: rgba(255, 255, 255, 0.82); /* blur廃止に合わせ少し不透明に＝点滅なしでも読みやすい */
  --accent: #0e8d7c;
  --accent-soft: #e3f3ef;
  --accent-dark: #0a6b60;
  --shadow: 0 16px 40px rgba(25, 45, 60, 0.12);
  --glassbrd: rgba(255, 255, 255, 0.78);
  --rcard: 20px;
  --rsm: 14px;
}

/* 背景：固定グラデ（iOSで安定するよう疑似要素を z-index:-1 で固定。background-attachment:fixed は使わない） */
[data-skin="glass"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(165deg, #e9f3f0 0%, #e4ecfb 54%, #f1ecf9 100%);
}

/* メインのカード面：半透明＋大角丸＋柔らかい影。frost はスクロールカードのみ。 */
[data-skin="glass"] .panel {
  background: var(--panel);
  border: 1px solid var(--glassbrd);
  border-radius: var(--rcard);
  box-shadow: var(--shadow);
  /* backdrop-filter(すりガラス)は廃止：iOS WKWebViewで日本語入力の変換バー等によりキーボード高さが変わるたびに
     このblur層が再描画され、画面が白⇄黒に点滅する主因（fixed/stickyで廃止済みなのと同じ理由）。半透明背景は維持。 */
}

/* 連絡先一覧：行カードをガラス化＋色付きアバター */
[data-skin="glass"] .contact-log ul { gap: 9px; }
[data-skin="glass"] .contact-log li {
  background: var(--panel);
  border: 1px solid var(--glassbrd);
  border-radius: var(--rsm);
  padding: 12px 14px;
  box-shadow: 0 8px 22px rgba(25, 45, 60, 0.08);
}
[data-skin="glass"] .log-item { align-items: center; gap: 10px; }
[data-skin="glass"] .log-avatar {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-top: 1px;
  border-radius: 13px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
[data-skin="glass"] .log-item .log-text strong { font-size: 14.5px; }
/* 塗りあり・線なしで「明確にボタン」と分かる見た目（白っぽいとカードと同化して誤タップの的になる） */
[data-skin="glass"] .log-write-button {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: none;
  border-radius: 12px;
  font-weight: 800;
}

/* ステータス＝丸ピル（クラスは維持＝QAの色軸アサーションそのまま） */
[data-skin="glass"] .contact-log li .log-status { border-radius: 999px; padding: 3px 11px; font-size: 10.5px; font-weight: 800; }
[data-skin="glass"] .log-status.todo  { background: rgba(194, 135, 47, 0.16); color: #9a6716; }
[data-skin="glass"] .log-status.later { background: rgba(194, 135, 47, 0.16); color: #9a6716; }
[data-skin="glass"] .log-status.done  { background: rgba(60, 70, 66, 0.12); color: #5d6b67; }  /* 送信済み＝落ち着いたグレー（要対応だけ目立たせる） */
[data-skin="glass"] .log-status.draft { background: rgba(10, 127, 214, 0.14); color: #1f5aa6; }
[data-skin="glass"] .log-badge.is-mail { background: var(--accent-soft); color: var(--accent-dark); }
/* glassの .contact-log li 一括カード化は日付グループ(li)/空状態(li)に箱を足してしまう → 個別に脱箱。
   人カードは .log-item(div) なので別途その白カードが残る。 */
[data-skin="glass"] .contact-log li.log-group { background: transparent; border: none; box-shadow: none; padding: 0; }
[data-skin="glass"] .contact-log li.contacts-empty,
[data-skin="glass"] .contact-log li.empty-log { background: transparent; border: none; box-shadow: none; }
[data-skin="glass"] .contact-log li.contacts-empty { padding: 30px 22px 24px; }
/* 右端クイック送信＝glassでも塗りボタン（角丸まる・誤タップしにくい） */

/* 詳細アバター：丸→角丸スクエアで Apple っぽく */
[data-skin="glass"] .cd-identity-avatar { border-radius: 16px; width: 52px; height: 52px; }
[data-skin="glass"] .cd-memory-hero {
  background:
    linear-gradient(135deg, rgba(227, 243, 239, 0.96), rgba(255, 255, 255, 0.66) 62%),
    rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.78);
}

/* ボタン：塗りに柔らかい teal 影、角丸大きめ。ghost は半透明ガラス。 */
[data-skin="glass"] .primary-button { border-radius: var(--rsm); border-color: var(--accent); box-shadow: 0 10px 22px rgba(14, 141, 124, 0.28); }
[data-skin="glass"] .secondary-button { border-radius: var(--rsm); }
/* 案A on glass（claude-303）：glassの既定ghostは半透明白＋白枠＝薄地に溶けて見えない、が白背景ボタン問題の震源。
   十分不透明な淡グレー地＋見えるダーク寄りhairlineにして「押せる」を平常時から出す（タッチにはホバー救済が無い）。 */
[data-skin="glass"] .ghost-button, [data-skin="glass"] .ai-link { border-radius: var(--rsm); background: rgba(229, 248, 242, 0.96); border: 1px solid transparent; color: var(--ink); }
/* ホバー/押下は base の filter: brightness に集約（地の差し替えをやめ、glassのteal塗りボタンも安全に暗くなるだけ） */

/* 詳細カード内の補助アクションは白に同化させない。追加=淡いteal、削除=赤系、開く=塗り。 */
[data-skin="glass"] .cd-add-link,
[data-skin="glass"] .cd-add-photo,
[data-skin="glass"] .cd-voice-actions .ghost-button {
  background: rgba(227, 243, 239, 0.9);
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--accent-dark);
  box-shadow: 0 8px 18px rgba(14, 141, 124, 0.08);
}
[data-skin="glass"] .cd-delete-button,
[data-skin="glass"] .cd-voice-delbtn {
  background: #fff4f2;
  border-color: rgba(163, 45, 45, 0.28);
  color: #a32d2d;
  box-shadow: none;
}
[data-skin="glass"] .cd-link-open {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 141, 124, 0.18);
}
[data-skin="glass"] .cd-reconnect-button {
  background: var(--accent);
  border: none;
  color: #fff;
  box-shadow: 0 12px 28px rgba(14, 141, 124, 0.24);
}
[data-skin="glass"] .cd-add-reunion-button {
  background: rgba(227, 243, 239, 0.95);
  border: 1px solid rgba(15, 118, 110, 0.26);
  color: var(--accent-dark);
  box-shadow: 0 10px 22px rgba(14, 141, 124, 0.12);
}

/* ブランドマーク */
[data-skin="glass"] .brand-mark { border-radius: 14px; box-shadow: 0 10px 24px rgba(14, 141, 124, 0.26); }

/* オンボも同じ言語に追従（オーバーレイは独自に不透明グラデ＝裏の本体を隠す） */
[data-skin="glass"] .onboard-overlay { background: linear-gradient(165deg, #e9f3f0 0%, #e4ecfb 54%, #f1ecf9 100%); }
[data-skin="glass"] .onb-card { border-radius: var(--rcard); border: 1px solid var(--glassbrd); box-shadow: var(--shadow); }
[data-skin="glass"] .onb-cta { border-radius: var(--rsm); box-shadow: 0 10px 22px rgba(14, 141, 124, 0.28); }

@media (min-width: 0px) {
  [data-skin="glass"] body { background: transparent; }

  /* sticky ヘッダー：不透明にして背後の内容が透けないように（＝上部の“空き/二重”見えを解消）。
     blur は乗せない（iOS WKWebView のスクロールカクつき対策を尊重）。 */
  [data-skin="glass"] .topbar { background: #e9f3f0; border-bottom: 1px solid var(--glassbrd); }

  /* タブバー：下端にベタ付け固定（浮かせない）。本文側の下パディング(92px)で逃がすので
     各種アクションボタン（追加/保存/送信済み/本文コピー）と重ならない＝classicと同じ安全レイアウト。 */
  [data-skin="glass"] .mobile-tabbar {
    bottom: 0;
    width: min(430px, 100%);
    border: none;
    border-top: 1px solid var(--glassbrd);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 30px rgba(25, 45, 60, 0.08);
  }
  [data-skin="glass"] .tabbar-button.is-selected { background: var(--accent); color: #fff; }
}

/* ===== 相互交換アバター（顔写真・claude-241） ===== */
/* 一覧: log-avatar のサイズ/角丸をそのまま引き継ぎ、画像で埋める（glassスキンのサイズ差も継承） */
img.log-avatar-face { object-fit: cover; padding: 0; display: block; }
/* 連絡先カードのヘッダー円: 円いっぱいに顔を出す */
.cd-identity-face { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.cd-identity-avatar { overflow: hidden; }
/* 自分のQR編集: 顔写真の行 */
.virtual-photo-controls { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.virtual-photo-preview { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line, #e3e0d6); }

/* ===== 山取り込み→Pro導線（claude-242） ===== */
.bulk-pro-pitch {
  background: #e6f3f0;
  border: 1px solid #0f766e;
  border-radius: 14px;
  padding: 13px 15px;
  margin: 8px 0 4px;
}
.bulk-pro-pitch[hidden] { display: none; }
.bulk-pro-pitch-text { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; line-height: 1.55; color: #0b5f59; }
.bulk-pro-pitch-actions { display: flex; gap: 8px; align-items: center; }
.bulk-pro-pitch-actions .primary-button { padding: 9px 16px; font-size: 13.5px; }
.bulk-pro-pitch-actions .ghost-button { padding: 9px 12px; font-size: 13px; }

/* ===== ニュース（v1.3候補・Labビルド限定・claude-254）===== */
.news-panel { padding: 16px 14px 30px; }
.news-panel.is-current-screen { display: block; }
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.news-head h2 { font-size: 19px; font-weight: 900; margin: 0; }
.news-fetch { font-size: 12.5px; font-weight: 800; padding: 6px 13px; flex: 0 0 auto; }
.news-stat { font-size: 11.5px; color: var(--muted); margin: 0 0 12px; min-height: 14px; }
.news-date { font-size: 11.5px; color: var(--muted); font-weight: 800; margin: 14px 0 8px; }
.news-card { border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; margin-bottom: 12px; background: var(--panel); }
.news-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.news-who { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.news-kind { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 8px; flex: 0 0 auto; }
.news-kind.is-news { background: #efecfb; color: #5a4cbf; }
.news-kind.is-post { background: var(--accent-soft); color: var(--accent-dark); }
.news-when { font-size: 11px; color: var(--muted); margin-left: auto; flex: 0 0 auto; }
.news-headline { font-size: 13.5px; font-weight: 700; line-height: 1.55; margin: 0 0 9px; }
.news-actions { display: flex; gap: 8px; }
.news-actions button { font-size: 12px; font-weight: 800; padding: 9px 11px; border-radius: 10px; }
.news-actions .news-send { flex: 1.4; } /* 主役だが独占しない（矢野7/17「開くも大きく」） */
.news-actions .news-open { flex: 1; }
.news-more { flex: 0 0 auto; margin-left: 2px; border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 6px; line-height: 1; cursor: pointer; }
.news-mute-row { margin-top: 8px; }
.news-mute-row button { font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 10px; opacity: 0.85; }
.news-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 24px 8px; line-height: 1.9; }
/* news-sheet（旧・専用シート）はclaude-357で「話題にして送る＝下書き合流」へ置換済み＝CSSも撤去 */

/* ===== FollowCue Pro 紹介（独立画面・スクロールで読ませる／claude-261）===== */
.pro-intro-overlay {
  position: fixed; inset: 0; z-index: 75;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #f7f5ee; color: #1e2421;
}
.pro-intro-overlay[hidden] { display: none; }
.pro-intro-stage {
  max-width: 480px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 44px);
}
.pi-close {
  background: none; border: 0; color: #0b5f59; font: inherit; font-size: 14px; font-weight: 800;
  cursor: pointer; padding: 6px 0; margin: 0 0 14px; -webkit-tap-highlight-color: transparent;
}
.pi-kicker { font-size: 13px; color: #0b5f59; font-weight: 800; margin: 0 0 6px; }
.pi-hero { padding-bottom: 14px; border-bottom: 1px solid #e3e0d6; margin-bottom: 22px; }
.pi-hero-title { font-size: 23px; font-weight: 900; line-height: 1.5; margin: 0 0 10px; }
.pi-hero-sub { font-size: 15px; line-height: 1.7; color: #3c443f; margin: 0; }
.pi-scene { display: block; margin: 0 0 26px; } /* claude-272: キャプション＋実機モックアップの縦積みに */
.pi-scene-cap { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 12px; }
.pi-scene-n {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px;
  background: #e6f3f0; color: #0b5f59; font-weight: 900; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.pi-scene-title { font-size: 16.5px; font-weight: 850; margin: 0 0 4px; line-height: 1.4; }
.pi-scene-body { font-size: 14px; line-height: 1.7; color: #3c443f; margin: 0; }
.pi-trust {
  background: #eef4f2; border: 1px solid #d7e4e0; border-radius: 16px;
  padding: 16px 18px; margin: 6px 0 20px;
}
.pi-trust-title { font-size: 13px; font-weight: 900; color: #0b5f59; margin: 0 0 8px; }
.pi-trust-list { list-style: none; padding: 0; margin: 0; }
.pi-trust-list li { font-size: 13.5px; line-height: 1.6; color: #3c443f; padding: 5px 0 5px 22px; position: relative; }
.pi-trust-list li::before { content: "✓"; position: absolute; left: 0; color: #0f766e; font-weight: 900; }
.pi-buy { text-align: center; }
.pi-price { font-size: 22px; font-weight: 900; color: #0b5f59; margin: 0 0 4px; }
.pi-price-unit { font-size: 13px; font-weight: 800; }
.pi-anchor { font-size: 12px; color: #3c443f; line-height: 1.6; margin: 0 0 14px; }
.pi-buy-btn { width: 100%; margin: 0 0 10px; }
.pi-restore-btn { width: 100%; }
.pi-foot { font-size: 11px; color: #7a817b; margin: 14px 0 0; }
/* スクロールで各ブロックがふわっと現れる（煽らない・落ち着いた動き） */
.pi-reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.pi-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .pi-reveal { opacity: 1; transform: none; transition: none; }
}

/* 連絡先カード＝シート風（下に引いて閉じる・claude-262）。つまみはモバイルで表示（.sheet-handle既定display:none） */
.contact-detail-panel > .sheet-handle { margin: 0 auto 10px; }

/* 「どこで会いましたか？」＝選んだら畳む（claude-263）。畳み行は選択名＋「▾ 変える」ヒント */
.event-collapsed-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.event-collapsed-row .event-change-hint { flex: 0 0 auto; font-size: 12px; font-weight: 700; opacity: .62; white-space: nowrap; }

/* 言い回しの畳み行＝一文が長いので本文側は伸縮・左寄せ（claude-264） */
.event-collapsed-row span:first-child { flex: 1 1 auto; min-width: 0; text-align: left; }

/* Pro紹介の見出し＝改行は意味の塊ごと（claude-268） */
.pi-hero-title .pi-nb { display: inline-block; }

/* ===== イベントモード＝カードデッキ（矢野モック採用 7/7・claude-278） =====
   1人1枚の白カード・横スクロール(スナップ)で次の人へ・右端に「＋次の人」。
   手打ち主・チップ補助（実戦データ）＝入力行を常設、自己紹介チップは畳んで下に。 */
.event-mode-overlay { position: fixed; inset: 0; z-index: 72; overflow-y: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(180deg, #e9f2ec 0%, #eef0f6 100%); }
.event-mode-overlay[hidden] { display: none; }
.event-mode-stage { max-width: 480px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 0 calc(env(safe-area-inset-bottom) + 32px); }
.em-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 20px 6px; }
.em-head-left { flex: 1 1 auto; min-width: 0; }
.em-title { font-size: 18px; font-weight: 900; margin: 0 0 8px; letter-spacing: -0.01em; }
#emEventName { width: 100%; font-size: 16px; font-weight: 700; padding: 8px 12px; border: 1px solid #d8e2dc; border-radius: 12px; background: rgba(255, 255, 255, .75); }
#emEventName::placeholder { font-weight: 600; color: #9aa79f; }
.em-end { flex: 0 0 auto; padding: 10px 20px; border: none; border-radius: 999px; background: #fff; font: inherit; font-weight: 800; font-size: 14px; color: #1c2b27; box-shadow: 0 2px 10px rgba(28, 43, 39, .08); cursor: pointer; }
.em-meta { display: flex; align-items: center; justify-content: space-between; margin: 8px 20px 10px; }
.em-count { font-size: 13px; color: #6b7a74; font-weight: 800; }
.em-dots { display: flex; gap: 6px; }
.em-dot { width: 6px; height: 6px; border-radius: 50%; background: #c6d4cd; transition: all .25s ease; }
.em-dot.is-active { width: 20px; border-radius: 3px; background: #177e6a; }
.em-deck { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 24px; scrollbar-width: none; }
.em-deck::-webkit-scrollbar { display: none; }
.em-card { scroll-snap-align: center; flex: 0 0 88%; max-width: 400px; background: #fff; border-radius: 28px; padding: 20px 18px 18px; box-shadow: 0 12px 34px rgba(23, 126, 106, .10), 0 2px 8px rgba(28, 43, 39, .05); position: relative; }
.em-card-del { position: absolute; top: 12px; right: 14px; border: none; background: none; color: #c2ccc6; font-size: 15px; padding: 6px; cursor: pointer; }
.em-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; padding-right: 22px; }
.em-avatar { width: 50px; height: 50px; border-radius: 17px; flex: 0 0 auto; background: #e3f0ec; color: #0f5f50; font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.em-avatar.is-filled { background: #177e6a; color: #fff; box-shadow: 0 6px 16px rgba(23, 126, 106, .3); }
.em-name-wrap { flex: 1 1 auto; min-width: 0; }
.em-name-input { width: 100%; border: none; background: transparent; font-size: 19px; font-weight: 800; color: #1c2b27; outline: none; padding: 0; }
.em-name-input::placeholder { color: #b9c6c0; font-weight: 600; }
.em-card-num { font-size: 12px; color: #9fada7; font-weight: 700; margin: 2px 0 0; }
.em-memo-panel { background: #f3f8f5; border-radius: 18px; padding: 13px 14px; margin-bottom: 10px; }
.em-memo-label { font-size: 11px; font-weight: 800; color: #6b7a74; margin: 0 0 6px; letter-spacing: .04em; }
.em-memo-body { font-size: 14px; line-height: 1.75; color: #1c2b27; margin: 0; word-break: break-word; }
.em-memo-body.is-empty { color: #9aa79f; }
.em-type-row { display: flex; gap: 8px; margin-bottom: 10px; }
.em-type-row input { flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 10px 12px; border: 1px solid #e3e9e4; border-radius: 12px; background: #fff; }
.em-type-row .primary-button { flex: 0 0 auto; white-space: nowrap; padding-left: 16px; padding-right: 16px; }
.em-chips { margin: 6px 0 10px; }
/* summaryはinline-block＝「追加」の真下に全幅の当たり判定を作らない（誤タップ対策・claude-280） */
.em-chips summary { display: inline-block; font-size: 12.5px; font-weight: 800; color: #177e6a; cursor: pointer; padding: 10px 6px 10px 2px; list-style: none; -webkit-tap-highlight-color: transparent; }
.em-chips summary::-webkit-details-marker { display: none; }
.em-chips summary::after { content: " ▾"; }
.em-chips[open] summary::after { content: " ▴"; }
.em-photo { width: 100%; }
.em-card-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255, 255, 255, .5); border: 2px dashed #bcd0c8; box-shadow: none; color: #6b7a74; font-weight: 700; font-size: 15px; min-height: 220px; cursor: pointer; }
.em-add-plus { width: 54px; height: 54px; border-radius: 50%; background: #177e6a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 8px 20px rgba(23, 126, 106, .35); }

/* ===== ニュースの設定（Pro予定・Lab先行／claude-270） ===== */
.news-settings-overlay { position: fixed; inset: 0; z-index: 74; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--paper, #f7f5ee); } /* 本体トークン＝glassスキンに追従（claude-359） */
.news-settings-overlay[hidden] { display: none; }
.news-settings-stage { max-width: 480px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 32px); }

/* 手動マージのシート（同じ人とまとめる・claude-296/297）：下からにゅっと出る＝別アプリ感を消す・名刺サムネで見分ける */
.merge-picker-overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; background: rgba(20, 28, 24, 0.34); }
.merge-picker-overlay[hidden] { display: none; }
.merge-picker-stage { width: 100%; }
.merge-sheet { max-width: 520px; margin: 0 auto; background: #f7f5ee; border-radius: 18px 18px 0 0; padding: 8px 16px calc(env(safe-area-inset-bottom) + 20px); max-height: 84vh; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 -8px 30px rgba(20, 28, 24, 0.16); }
.merge-sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 12px; }
.merge-sheet-title { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--ink); }
.merge-sheet-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.merge-sheet-search { width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.merge-suggest { display: flex; flex-direction: column; gap: 8px; }
.merge-suggest-head { margin: 8px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; color: #0f766e; }
.merge-suggest-allhead { margin: 16px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; color: var(--muted); }
.merge-picker-list { display: flex; flex-direction: column; gap: 8px; }
.merge-row { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.merge-row:active { background: #f1f3f1; }
.merge-row-thumb { flex: 0 0 auto; width: 60px; height: 40px; border-radius: 6px; overflow: hidden; background: #10231d; display: grid; place-items: center; color: #cbd5cf; font-weight: 800; font-size: 15px; }
.merge-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.merge-row-thumb.is-none { background: #e8ebe6; color: var(--muted); }
.merge-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.merge-row-name { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merge-row-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merge-picker-empty { margin: 12px 0; font-size: 13px; color: var(--muted); }
.merge-sheet-cancel { margin-top: 16px; width: 100%; }
.ns-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ns-title { font-size: 16px; font-weight: 900; margin: 0; }
.ns-note { font-size: 12px; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.ns-label { font-size: 12.5px; font-weight: 800; color: var(--ink); margin: 14px 0 6px; }
.ns-add { display: flex; gap: 8px; }
.ns-add input { flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.ns-hint { font-size: 12.5px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 8px 0 0; line-height: 1.6; }
.ns-preview { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; margin-top: 8px; }
.ns-preview-kind { font-size: 12px; font-weight: 800; color: var(--accent-dark); margin: 0 0 4px; }
.ns-preview-item { font-size: 12.5px; color: var(--ink); margin: 2px 0; line-height: 1.6; }
.ns-muted { color: var(--muted); }
#nsPersonSearch { width: 100%; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 8px; }
.ns-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ns-add-btn { width: 100%; }
.ns-person { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; margin-bottom: 8px; }
.ns-person-name { font-size: 13.5px; font-weight: 850; margin: 0 0 4px; }
.ns-src { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink); margin: 3px 0; word-break: break-all; }
.ns-badge { flex: 0 0 auto; font-size: 10px; font-weight: 800; background: var(--accent-soft); color: var(--accent-dark); border-radius: 6px; padding: 2px 6px; }
.ns-del { flex: 0 0 auto; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; padding: 3px 9px; color: var(--muted); cursor: pointer; }
.ns-reset { width: 100%; margin-top: 12px; }
.ns-add .primary-button { flex: 0 0 auto; white-space: nowrap; padding-left: 14px; padding-right: 14px; }

/* ===== Pro紹介の実機モックアップ＋例文切替（アーティファクト最終版を移植・claude-272） ===== */
.pi-lockup svg { height: 30px; width: auto; display: block; margin: 0 0 14px; }
.pi-persona-row { display: flex; align-items: center; gap: 10px; padding: 14px 0 0; }
.pi-persona-lbl { font-size: 12.5px; font-weight: 800; color: #6b726e; }
.pi-pills { display: flex; gap: 2px; background: #fff; border: 1px solid #e3ded1; border-radius: 999px; padding: 3px; }
.pi-pills button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 800; color: #6b726e; padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.pi-pills button[aria-pressed="true"] { background: #0f766e; color: #fff; }
.pi-screen { background: #fff; border: 1px solid #ece7da; border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(20, 40, 36, .22); padding: 13px 13px 15px; overflow: hidden; }
.pi-statusbar { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; color: #9aa09b; font-size: 11px; font-weight: 700; }
.pi-sb-dots { display: flex; gap: 4px; }
.pi-sb-dots i { width: 5px; height: 5px; border-radius: 50%; background: #d6d1c4; display: block; }
.pi-mrow { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid #ece7da; border-radius: 13px; background: #fff; }
.pi-mrow + .pi-mrow { margin-top: 8px; }
.pi-av { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 14px; }
.pi-av-a { background: #7d67d8; }
.pi-av-b { background: #2e9e86; }
.pi-av-c { background: #c98a2b; }
.pi-av-d { background: #4d7fd6; }
.pi-who { min-width: 0; flex: 1 1 auto; }
.pi-nm { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-sub { font-size: 12px; color: #6b726e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pi-chip { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: #e9f3ea; color: #3b6d11; }
.pi-ctx { display: flex; align-items: center; gap: 8px; background: #e6f3f0; border: 1px solid #cfe7e0; color: #0b5f59; font-size: 12px; font-weight: 700; padding: 8px 11px; border-radius: 11px; margin-bottom: 10px; }
.pi-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #fff; color: #0f766e; padding: 2px 6px; border-radius: 6px; flex: 0 0 auto; }
.pi-compose-body { border: 1px solid #ece7da; border-radius: 12px; padding: 12px 13px; min-height: 112px; font-size: 13.5px; line-height: 1.85; }
.pi-ln { margin: 0 0 2px; }
.pi-caret, .pi-qcaret { display: inline-block; width: 2px; height: 15px; background: #0f766e; vertical-align: -2px; margin-left: 1px; animation: piCaret 1s steps(1) infinite; }
.pi-badge { display: inline-flex; align-items: center; gap: 6px; background: #fbf1df; color: #8a5a00; font-weight: 800; font-size: 12px; padding: 5px 11px; border-radius: 999px; margin-bottom: 12px; }
.pi-msg { border: 1px solid #ece7da; border-radius: 12px; padding: 14px; }
.pi-msg p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.8; }
.pi-msg p:last-child { margin-bottom: 0; }
.pi-hl { background: #fffaf0; border-left: 3px solid #e6b64d; padding: 7px 10px; border-radius: 0 8px 8px 0; color: #5f4a12; }
.pi-timeline { padding-left: 6px; }
.pi-tl { display: flex; gap: 12px; padding: 9px 0; }
.pi-tl-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: #0f766e; margin-top: 4px; position: relative; }
.pi-tl-dot::after { content: ""; position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 2px; height: 26px; background: #d9e6e2; }
.pi-tl:last-child .pi-tl-dot::after { display: none; }
.pi-tl-d { font-size: 12px; font-weight: 800; color: #0b5f59; }
.pi-tl-w { font-size: 13px; margin-top: 1px; }
.pi-sbar { display: flex; align-items: center; gap: 8px; border: 1.5px solid #0f766e; border-radius: 12px; padding: 9px 12px; margin-bottom: 11px; background: #fff; }
.pi-q { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; display: inline-flex; }
.pi-qtext { display: inline-block; overflow: hidden; white-space: nowrap; animation: piType 9s ease-in-out infinite both; }
.pi-memo { font-size: 11.5px; color: #6b726e; }
.pi-memo mark { background: #fff3cf; color: #7a5a12; padding: 0 3px; border-radius: 4px; font-weight: 800; }
.pi-step { animation: piStep 9s ease-in-out infinite both; }
.pi-stamp { animation: piStamp 9s ease-in-out infinite both; }
.pi-fade { animation: piFadeout 9s ease-in-out infinite both; }
.pi-match { animation: piMatch 9s ease-in-out infinite both; }
@keyframes piCaret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes piStep { 0%, 6% { opacity: 0; transform: translateY(7px); } 12%, 82% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-5px); } }
@keyframes piStamp { 0%, 20% { opacity: 0; transform: scale(.6); } 28% { opacity: 1; transform: scale(1.12); } 34%, 82% { opacity: 1; transform: scale(1); } 90%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes piType { 0%, 8% { max-width: 0; } 22%, 84% { max-width: 6ch; } 92%, 100% { max-width: 0; } }
@keyframes piFadeout { 0%, 26% { opacity: 1; max-height: 64px; margin-top: 8px; } 40%, 82% { opacity: 0; max-height: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; border-width: 0; } 92%, 100% { opacity: 1; max-height: 64px; margin-top: 8px; } }
@keyframes piMatch { 0%, 40% { background: #fff; border-color: #ece7da; } 52%, 84% { background: #f6fbf9; border-color: #bfe0d8; } 96%, 100% { background: #fff; border-color: #ece7da; } }

/* シーン6: 所属の使い分け（claude-349）＝所属ピルのタップでカードの色と名乗りが切り替わる（9sループ＝他シーンと同調）。
   色は本物の所属パレット（wine/navy=CARD_THEMES）・QRは白黒のまま＝実アプリと同じ約束を見せる */
.pi-qcard {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  border-radius: 14px; padding: 14px; min-height: 96px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #9e2b4e, #3d1220); /* wine */
}
.pi-qcard::after { /* navy が中盤でふわっと重なる＝タップで切り替わった表現 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(150deg, #274b8f, #111d3b);
  opacity: 0; animation: piQcSwap 9s ease-in-out infinite both;
}
.pi-qc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pi-qc-eyebrow { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.pi-qc-nm { font-size: 18px; font-weight: 800; line-height: 1.1; }
.pi-qc-roles { position: relative; display: block; font-size: 11.5px; color: rgba(255, 255, 255, .92); min-height: 16px; min-width: 190px; }
.pi-qc-role { position: absolute; left: 0; top: 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pi-qc-ra { animation: piQcA 9s ease-in-out infinite both; }
.pi-qc-rb { opacity: 0; animation: piQcB 9s ease-in-out infinite both; }
.pi-qc-qr {
  position: relative; z-index: 1; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 6px; border: 3px solid #fff;
  background-color: #fff;
  background-image:
    repeating-linear-gradient(90deg, #111 0 3px, #fff 3px 6px),
    repeating-linear-gradient(0deg, #111 0 3px, #fff 3px 6px);
  background-blend-mode: multiply;
}
.pi-qc-pills { display: flex; gap: 8px; margin-top: 10px; }
.pi-qc-pill { border: 1px solid #ece7da; border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 800; color: #6b736e; background: #fff; }
.pi-qc-p1 { animation: piQcP1 9s ease-in-out infinite both; }
.pi-qc-p2 { animation: piQcP2 9s ease-in-out infinite both; }
@keyframes piQcSwap { 0%, 38% { opacity: 0; } 46%, 84% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes piQcA { 0%, 40% { opacity: 1; } 46%, 84% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes piQcB { 0%, 40% { opacity: 0; } 46%, 84% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes piQcP1 { 0%, 38% { background: #0f766e; border-color: #0f766e; color: #fff; } 46%, 84% { background: #fff; border-color: #ece7da; color: #6b736e; } 94%, 100% { background: #0f766e; border-color: #0f766e; color: #fff; } }
@keyframes piQcP2 { 0%, 38% { background: #fff; border-color: #ece7da; color: #6b736e; transform: none; } 42% { transform: scale(.94); } 46%, 84% { background: #0f766e; border-color: #0f766e; color: #fff; transform: none; } 94%, 100% { background: #fff; border-color: #ece7da; color: #6b736e; } }
@media (prefers-reduced-motion: reduce) {
  .pi-step, .pi-stamp { animation: none; opacity: 1; transform: none; }
  .pi-fade { animation: none; opacity: .4; }
  .pi-caret, .pi-qcaret { animation: none; opacity: 0; }
  .pi-qtext { animation: none; max-width: none; }
  .pi-match { animation: none; background: #f6fbf9; border-color: #bfe0d8; }
  /* シーン6は静止＝仕事の所属（wine・ピル1点灯）で止める */
  .pi-qcard::after, .pi-qc-ra, .pi-qc-rb, .pi-qc-p1, .pi-qc-p2 { animation: none; }
  .pi-qc-ra { opacity: 1; }
  .pi-qc-rb { opacity: 0; }
  .pi-qc-p1 { background: #0f766e; border-color: #0f766e; color: #fff; }
}

/* ===== 連絡先メモの手打ち入力＋名刺追いOCR＋メール送信（実戦FB反映・claude-275） ===== */
.cd-memo-date-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.cd-memo-date-label input {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #d8d5c9;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.cd-type-row { display: flex; align-items: stretch; gap: 8px; }
.cd-type-row textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid #d8d5c9;
  border-radius: 12px;
  background: #fff;
}
.cd-type-row .primary-button { flex: 0 0 auto; white-space: nowrap; padding-left: 16px; padding-right: 16px; }
.cd-memo-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.cd-memo-history:empty { display: none; }
.cd-memo-history-title {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.cd-memo-history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: #f7fbf9;
}
.cd-memo-history-date {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.cd-memo-history-text {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cd-memory-note-list { display: grid; gap: 8px; }
.cd-memory-note-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; }
.cd-memory-note-date { color: var(--accent-dark); font-size: 12px; font-weight: 850; white-space: nowrap; padding-top: 3px; }
.cd-memory-note-text { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cd-memory-note-more { color: var(--muted); font-size: 12px; font-weight: 800; }

/* 「＋リンク追加」＝ボタンに見えるように（木下さんFB 7/7「ボタンがボタンぽくない」） */
#addLinkButton { border: 1.5px solid #0f766e; color: #0b5f59; background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 800; }

/* 「今回載せるもの」＝自分の連絡先リンク（受け取りページ・claude-277）を先頭に・少し強調 */
.material-item.material-profile { border-color: #cfe7e0; background: #f3f8f5; }
.material-item.material-profile.is-selected { border-color: #0f766e; }
.material-item.material-profile .material-check small { color: #0b5f59; }


/* ===== リンクのプリセット切替（Lab試作・claude-282） ===== */
.preset-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.preset-bar[hidden] { display: none; }
.preset-label { font-size: 13.5px; font-weight: 800; color: #3c443f; } /* 「所属」＝節の名前に格上げ＝少し大きく濃く（矢野FB・claude-323） */
.preset-pill { border: 1.5px solid #d8e2dc; background: #fff; color: #3c443f; font: inherit; font-size: 13px; font-weight: 800; padding: 7px 14px; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.preset-pill.is-on { background: #0f766e; border-color: #0f766e; color: #fff; }
.preset-pill.preset-add { padding: 7px 14px; color: #0b5f59; background: none; } /* 破線の丸→言葉のあるゴーストピル（claude-322） */

/* QR全画面の所属スイッチャー（claude-322）＝暗背景の上の小ピル列。見せる瞬間の1タップ切替 */
.show-preset-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 2px 0 4px; }
.show-preset-bar[hidden] { display: none; }
.show-preset-label { font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, 0.72); letter-spacing: 0.04em; }
.show-preset-pill { border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 12.5px; font-weight: 800; padding: 6px 13px; border-radius: 999px; -webkit-tap-highlight-color: transparent; }
.show-preset-pill.is-on { background: #fff; border-color: #fff; color: #12221e; }

/* 交換画面「いま：◯◯」（claude-322）＝My QRを見せるの直下の控えめな一行 */
.ex-preset-now { border: none; background: none; font: inherit; font-size: 12.5px; font-weight: 800; color: #0b5f59; padding: 2px 4px; text-align: center; }
.preset-hint { flex-basis: 100%; font-size: 12px; color: #0b5f59; margin: 2px 0 0; line-height: 1.6; }
.preset-del { border: none; background: none; font: inherit; font-size: 12px; color: #9aa09b; text-decoration: underline; cursor: pointer; padding: 4px 2px; }

/* My QRのカード地色：落ち着いた／あざやか／淡い */
.preset-color-row { display: block; margin: -6px 0 16px; }
.preset-color-row[hidden] { display: none; }
.preset-color-label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; color: #3c443f; }
.preset-palette-group + .preset-palette-group { margin-top: 10px; }
.preset-palette-label { display: block; margin-bottom: 6px; font-size: 11.5px; color: var(--muted); }
.preset-palette-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.preset-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #d8e2dc; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.preset-swatch.is-on { box-shadow: 0 0 0 2.5px #0f766e; }
.preset-photo-group { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
/* 所属ごとの写真タイル（claude-340）：＝この所属＝この名刺（写真版） */
.preset-swatch-photo { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; line-height: 1; color: #6b736d; background: #f0f4f1; border: 2px dashed #c4d0c9; box-shadow: none; }
.preset-swatch-photo.has-photo { background: linear-gradient(135deg, #3b4652, #14181d); border-style: solid; border-color: #fff; }
.preset-swatch-photo.is-on { box-shadow: 0 0 0 2.5px #0f766e; }
.preset-photo-link { border: none; background: none; font: inherit; font-size: 12px; color: #0b5f59; text-decoration: underline; cursor: pointer; padding: 4px 2px; -webkit-tap-highlight-color: transparent; }


/* ===== イベントのふりかえり（Lab試作・claude-283） ===== */
.em-head-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.em-recap-btn { background: #177e6a; color: #fff; }
.em-recap { background: #fff; border-radius: 24px; margin: 4px 20px 24px; padding: 18px 18px 16px; box-shadow: 0 12px 34px rgba(23, 126, 106, .10), 0 2px 8px rgba(28, 43, 39, .05); }
.em-recap-lead { font-size: 13px; font-weight: 800; color: #6b7a74; margin: 0 0 4px; }
.em-recap-sec { font-size: 12px; font-weight: 800; color: #0b5f59; letter-spacing: .04em; margin: 16px 0 6px; }
.em-recap-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0ede4; font-size: 14px; }
.em-recap-row b { color: #0f5f50; }
.em-recap-empty { font-size: 12.5px; color: #9aa79f; margin: 2px 0; line-height: 1.6; }
.em-recap-person { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #f0ede4; }
.em-recap-person b { font-size: 13.5px; }
.em-recap-person span { font-size: 12.5px; color: #6b7a74; line-height: 1.6; }
.em-recap-foot { font-size: 11px; color: #9aa79f; margin: 14px 0 0; line-height: 1.6; }

/* ソロモードの肉付けボタン（claude-285） */
.em-solo-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; border-top: 1px solid #f0ede4; padding-top: 12px; }
.em-solo-actions .ghost-button { width: 100%; }

/* 復帰バナー＋ふりかえりAI（claude-286） */
/* 棚＝横1行のチップ列（claude-329・矢野FB「3つで圧迫」）：8会あっても高さ1行分で固定 */
.em-shelf { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.em-shelf::-webkit-scrollbar { display: none; }
.em-resume { flex: 0 0 auto; border: 1.5px dashed #177e6a; background: rgba(255, 255, 255, .7); color: #0b5f59; font-size: 13px; font-weight: 800; padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }

/* 会の完了カード（claude-329）：保存された名前を事実で見せる。モノクロ×teal・情緒なし */
.em-done-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(18, 34, 30, 0.42); display: flex; align-items: center; justify-content: center; padding: 24px; }
.em-done-overlay[hidden] { display: none; }
.em-done-card { width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 26px 22px 20px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22); display: grid; gap: 10px; }
.em-done-event { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: #6b726e; margin: 0; }
.em-done-title { font-size: 19px; font-weight: 900; color: #1e2421; margin: 0; }
.em-done-names { font-size: 13.5px; color: #2e3733; line-height: 1.8; margin: 0; }
.em-done-note { font-size: 12px; color: #6b726e; margin: 2px 0 6px; }
.em-recap-ai { margin-top: 16px; border-top: 1px solid #f0ede4; padding-top: 4px; }
.em-recap-ai-btns { display: flex; gap: 8px; margin-top: 8px; }
.em-recap-ai-btns .ghost-button { flex: 1 1 0; }

/* リストで選ぶ（Lab試作・claude-288） */
.batch-list-label { font-size: 12px; font-weight: 800; color: #6b726e; align-self: center; margin-right: 2px; }
#cdListsField .memo-chip-grid { margin-top: 6px; }

/* 名刺画像の操作（消す・撮り直す）・中馬さんFB 7/8・claude-290 */
.cd-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.cd-photo-actions[hidden] { display: none; }
.cd-photo-actions .ghost-button { flex: 1 1 auto; font-size: 13px; }

/* ユーザー定義チップ（追加/削除・claude-291） */
.user-chip-wrap { position: relative; display: inline-flex; }
.user-chip-wrap .user-chip { padding-right: 24px; } /* ×のぶん右を空ける */
.user-chip-x { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 18px; height: 18px; border: none; border-radius: 50%; background: rgba(0,0,0,.08); color: #6b726e; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.user-chip-x:active { background: rgba(0,0,0,.16); }
.memo-chip.chip-add { border-style: dashed; color: #0b5f59; font-weight: 800; }

/* ===== まとめて下書き（claude-330）＝本体トークンで統一（旧インラインのクリーム色を廃止） ===== */
.batch-overlay { position: fixed; inset: 0; z-index: 60; background: var(--paper); color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; }
[data-skin="glass"] .batch-overlay { background: #e9f3f0; }
.batch-overlay[hidden] { display: none; }
.batch-wrap { max-width: 680px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 60px); }
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.batch-title { min-width: 0; overflow-wrap: anywhere; font-size: 19px; font-weight: 800; margin: 0; }
.batch-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.batch-block { margin: 0 0 16px; }
.batch-label { font-size: 12.5px; font-weight: 800; color: var(--accent-dark); margin: 0 0 8px; }
.batch-label-mini { color: var(--muted); font-weight: 700; }
.batch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.batch-chip { border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 800; padding: 8px 15px; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.batch-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.batch-chip.batch-chip-add { background: none; border-style: dashed; color: var(--accent-dark); font-weight: 700; }
.batch-overlay input[type="text"] { width: 100%; font-size: 16px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-sizing: border-box; }
.batch-people-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.batch-people-head .batch-label { margin: 0; flex: 1 1 auto; }
.batch-selectall { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.batch-selectall input { width: auto; margin: 0; padding: 0; min-height: 0; }
.batch-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.batch-people { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.batch-person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.batch-person:last-child { border-bottom: none; }
.batch-person input { width: auto; flex: 0 0 auto; margin: 0; padding: 0; min-height: 0; }
.batch-person-av { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.batch-person-main { flex: 1 1 auto; min-width: 0; }
.batch-person-name { font-weight: 800; }
.batch-person-meta { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* inlineだとellipsisが死ぬ（bugcheck330#9） */
.batch-person-lists { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 40%; }
.batch-person-lists span { font-size: 10.5px; font-weight: 800; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.batch-cta { width: 100%; margin-top: 4px; }
/* glass地ではghostボタンが地色と同化する（bugcheck330#7）→topbar前例(白上書き)に倣う。tplシート内は白パネルなので絞る */
[data-skin="glass"] .batch-head .ghost-button,
[data-skin="glass"] #batchBackButton { background: #fff; }
/* レビュー画面＝選択画面と同じトークン（bugcheck330#8） */
.batch-review-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.batch-review-ta { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 16px; line-height: 1.7; resize: vertical; background: #fff; color: var(--ink); }

/* テンプレ編集シート */
.tpl-sheet { position: fixed; inset: 0; z-index: 65; background: rgba(18, 34, 30, 0.42); display: flex; align-items: flex-end; justify-content: center; }
.tpl-sheet[hidden] { display: none; }
.tpl-sheet-panel { width: min(560px, 100%); background: var(--panel); border-radius: 18px 18px 0 0; padding: 20px 18px calc(env(safe-area-inset-bottom) + 18px); display: grid; gap: 12px; }
.tpl-sheet-title { font-size: 16px; font-weight: 800; margin: 0; }
.tpl-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.tpl-delete { border: none; background: none; font: inherit; font-size: 12.5px; color: var(--rose); text-decoration: underline; cursor: pointer; padding: 2px; justify-self: center; }


/* ===== 職能（スキル）チップ＝Lab試作 cc_skills（claude-367） ===== */
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.skill-chips:empty { margin: 4px 0; }
.skill-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 8px 7px 12px; border: 1px solid rgba(15, 23, 42, 0.14); border-radius: 999px; background: rgba(255, 255, 255, 0.72); font-size: 13px; font-weight: 600; line-height: 1; }
.skill-chip button { border: 0; background: none; padding: 2px 4px; font-size: 13px; line-height: 1; color: inherit; opacity: 0.55; cursor: pointer; }
.skill-add-row { display: flex; gap: 8px; align-items: center; }
.skill-add-row input { flex: 1; min-width: 0; }
.skill-add-row .ghost-button { flex: 0 0 auto; }
.skill-note { margin: 8px 0 0; font-size: 12px; opacity: 0.65; line-height: 1.6; }

/* Labバッジ（claude-379）＝試作段階の機能に付ける小さな印。モノクロ・hairline */
.lab-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px 2px;
  border: 1px solid rgba(17, 35, 31, 0.35);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(17, 35, 31, 0.6);
  vertical-align: 2px;
}

/* 名乗りのプレビュー（claude-451）＝いま何と名乗るかを、設定画面でそのまま見せる */
.self-intro-preview { margin:6px 0 0; font-size:13px; color:var(--muted, #66736e); line-height:1.7; }
.self-intro-preview.is-off { opacity:.5; text-decoration:line-through; }
.self-intro-preview.is-empty { color:#9aa4a0; }


/* My QRの読み仮名（claude-453）＝名前のすぐ下に小さく。読めない漢字を相手に渡す。 */
.virtual-reading{ margin:2px 0 0; font-size:12px; letter-spacing:.04em; color:var(--muted,#6b7280); }
.virtual-reading:empty{ display:none; }
/* 相手が自分で書いた紹介（claude-453）＝こちらのメモとは別物なので枠で分ける。下書きには流さない。 */
.cd-their-bio{ margin:0 0 10px; padding:8px 12px; border-left:3px solid var(--line,#dbe1dc);
  background:rgba(0,0,0,.025); border-radius:0 8px 8px 0; }
.cd-their-bio-kicker{ margin:0 0 2px; font-size:10.5px; letter-spacing:.06em; opacity:.6; }
.cd-their-bio-text{ margin:0; font-size:13.5px; line-height:1.7; white-space:pre-wrap; word-break:break-word; }


/* メモは相手に見えない、を書いておく（claude-454・8/5ユーザーFB「私のみ閲覧できる？相手に共有される？」）。
   自動送信しない・端末内だけ、が製品の約束なのに、画面のどこにも書いていなかった。 */
.memo-private-note{ margin:2px 0 8px; font-size:11.5px; line-height:1.6; color:var(--muted,#6b7280); font-weight:400; letter-spacing:0; }

/* ★紙の名刺（Lab試作 cc_paper・claude-475）。本番では入口ごと出ないが、CSSは常にあってよい。
   モノクロ＋hairline＋余白。情緒的な装飾はしない（矢野の美意識）。 */
.paper-sheet { padding: 18px 16px calc(env(safe-area-inset-bottom) + 24px); max-width: 560px; margin: 0 auto; }
.paper-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.paper-head h3 { min-width: 0; margin: 0; font-size: 17px; }
.paper-head .ghost-button { flex: 0 0 auto; white-space: nowrap; }
.paper-lead { margin: 8px 0 0; font-size: 12.5px; color: #5f6e69; line-height: 1.7; }
.ppr-progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 14px 0 4px; padding: 0; }
.ppr-progress-step { min-width: 0; display: flex; align-items: center; gap: 6px; color: #8a938f;
  font-size: 10.5px; line-height: 1.25; }
.ppr-progress-step::after { content: ""; height: 1px; flex: 1; min-width: 4px; background: #dce1dd; }
.ppr-progress-step:last-child::after { display: none; }
.ppr-progress-num { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center;
  border: 1px solid #d6dcd8; border-radius: 50%; background: #fff; color: #6f7974; font-size: 10px; font-weight: 700; }
.ppr-progress-step.is-current { color: #1e2421; font-weight: 700; }
.ppr-progress-step.is-current .ppr-progress-num { border-color: #0f766e; background: #0f766e; color: #fff; }
.ppr-progress-step.is-done { color: #53615d; }
.ppr-progress-step.is-done .ppr-progress-num { border-color: #b9d5ce; background: #e8f3f0; color: #0f766e; }
.paper-fixed { margin: 14px 0 0; font-size: 13px; background: #eff4f2; border-radius: 10px; padding: 10px 12px; }
.paper-fixed b { font-size: 15px; }
.paper-sub { margin: 20px 0 8px; font-size: 12px; font-weight: 800; color: #5f6e69; }
.paper-rows { display: flex; flex-direction: column; gap: 8px; }
.paper-row { display: flex; align-items: flex-start; gap: 11px; background: #fff; border: 1px solid #e3e0d6;
             border-radius: 12px; padding: 12px 13px; cursor: pointer; }
.paper-row.is-empty { opacity: .55; cursor: default; }
.paper-row input { margin-top: 2px; width: 20px; height: 20px; flex: 0 0 auto; }
.paper-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.paper-main b { font-size: 14px; }
.paper-val { font-size: 12px; color: #5f6e69; overflow-wrap: anywhere; }
.paper-note { font-size: 11.5px; color: #9a4358; }
.paper-preview { margin-top: 22px; border-top: 1px solid #e3e0d6; padding-top: 6px; }
.paper-preview-card { background: #fff; border: 1px solid #e3e0d6; border-radius: 13px; padding: 13px 15px; }
.paper-preview-card b { font-size: 15px; }
.paper-preview-card ul { margin: 7px 0 0; padding-left: 18px; }
.paper-preview-card li { font-size: 12.5px; color: #34352f; line-height: 1.75; overflow-wrap: anywhere; }

/* ===== オンボ v2（Lab試作 cc_onbv2・claude-480）=====
   カード1枚を置きっぱなしにして、質問の面だけ入れ替える。アニメは短く（160〜260ms）、
   reduce-motion では全部止まる（app.js側で分岐）。 */
.ov2-wrap { width: 100%; max-width: 360px; margin: auto; display: flex; flex-direction: column; }
.ov2-prog { display: flex; gap: 5px; align-items: center; padding: 2px 2px 14px; }
.ov2-dot { height: 3px; flex: 1; border-radius: 2px; background: var(--line); transition: background .2s ease; }
.ov2-dot.on { background: var(--accent); }
.ov2-step { font-size: 11px; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.ov2-pane { min-height: 168px; transition: opacity .16s ease, transform .16s ease; }
.ov2-pane.is-leave { opacity: 0; transform: translateY(-6px); }
.ov2-pane.is-enter { opacity: 0; transform: translateY(8px); }
.ov2-h { font-size: 21px; font-weight: 600; line-height: 1.35; margin: 0; }
.ov2-sub { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 7px 0 0; }
.ov2-label { display: block; font-size: 11.5px; color: var(--muted); margin: 14px 0 6px; }
.ov2-input { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; }
.ov2-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .10); outline: none; }
.ov2-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.ov2-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 13px; font-size: 13px; color: var(--ink); transition: background .15s ease, color .15s ease; }
.ov2-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ov2-swatches { display: grid; gap: 9px; margin-top: 6px; }
.ov2-palette-label { display: block; margin-bottom: 5px; font-size: 10.5px; color: var(--muted); }
.ov2-palette-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ov2-sw { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #bcc4bf; position: relative; }
.ov2-sw.on { box-shadow: 0 0 0 2.5px var(--ink); }

/* 置きっぱなしのカード */
.ov2-card { margin: 16px auto 0; width: 236px; border-radius: 16px; padding: 15px 14px 13px;
  color: #fff; position: relative; overflow: hidden; box-shadow: 0 12px 30px rgba(30, 36, 33, .16); }
.ov2-card-fade { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.ov2-card-lab { font-size: 8.5px; letter-spacing: .16em; opacity: .62; font-weight: 700; position: relative; }
.ov2-card-name { font-size: 20px; font-weight: 700; margin-top: 6px; min-height: 25px; position: relative; }
.ov2-card-name.is-empty { opacity: .28; font-weight: 400; }
.ov2-card-role { font-size: 11px; opacity: .78; margin-top: 2px; min-height: 14px; position: relative; }
.ov2-card-role.is-empty { opacity: .3; }
.ov2-card.is-light-theme { color: #20251f; }
.ov2-card-qr { border-radius: 9px; margin-top: 11px; position: relative; min-height: 128px;
  display: grid; place-items: center; transition: opacity .25s ease, transform .25s ease; }
.ov2-card-qr.is-locked { background: rgba(255, 255, 255, .14); }
.ov2-card.is-light-theme .ov2-card-qr.is-locked { background: rgba(31, 37, 31, .1); }
.ov2-card-qr.is-reveal { opacity: 0; transform: scale(.96); }
.ov2-qr-hint { font-size: 10.5px; text-align: center; line-height: 1.65; padding: 22px 8px; opacity: .85; white-space: pre-line; }
.ov2-qr-real { background: #fff; border-radius: 9px; padding: 8px; }
.ov2-qr-real canvas, .ov2-qr-real img, .ov2-qr-real svg { width: 112px; height: 112px; display: block; }
.ov2-qr-cap { font-size: 9px; opacity: .72; text-align: center; margin-top: 6px; }
.ov2-card-links { display: flex; gap: 6px; justify-content: center; margin-top: 9px; position: relative; flex-wrap: wrap; }
.ov2-lk { font-size: 9px; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 4px 9px; }
.ov2-news-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 13px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .72); }
.ov2-news-label { flex: 0 0 auto; color: var(--accent); font-size: 11.5px; font-weight: 700; line-height: 1.65; }
.ov2-news-note p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.ov2-foot { margin-top: 16px; }
.ov2-foot .onb-cta { width: 100%; }

/* 実画面の上の案内（scrim / sheet / tip / spot） */
#onbv2Guide { position: absolute; inset: 0; z-index: 40; }
.ov2-scrim { position: absolute; inset: 0; background: rgba(20, 26, 23, .5); }
.ov2-scrim.is-light { background: rgba(20, 26, 23, .35); }
.ov2-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; color: var(--ink);
  border-radius: 18px 18px 0 0; padding: 16px 20px calc(env(safe-area-inset-bottom) + 24px);
  box-shadow: 0 -10px 30px rgba(20, 26, 23, .14);
  transform: translateY(14px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.ov2-sheet.is-up { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ov2-sheet { transition: none; transform: none; opacity: 1; } }
.ov2-grab { width: 34px; height: 4px; background: var(--line); border-radius: 2px; margin: 0 auto 13px; }
.ov2-sheet-h { font-size: 17px; font-weight: 600; margin: 0; }
.ov2-sheet-p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 6px 0 0; }
.ov2-sheet .ov2-input { margin-top: 12px; }
.ov2-sheet .onb-cta { width: 100%; margin-top: 14px; }
.ov2-sheet .onb-skip-link { width: 100%; margin-top: 4px; }
.ov2-tip { position: absolute; background: #fff; color: var(--ink); border-radius: 12px; padding: 13px 15px;
  box-shadow: 0 10px 30px rgba(20, 26, 23, .22); }
.ov2-tip-h { font-size: 14px; font-weight: 600; margin: 0 0 5px; }
.ov2-tip-p { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 0; }
.ov2-tip-row { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; }
.ov2-tip-ok { padding: 8px 16px; font-size: 12.5px; width: auto; }
.ov2-spot { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(20, 26, 23, .5);
  outline: 2px solid #fff; outline-offset: 2px; pointer-events: none; }

/* ===== 紙の名刺・第2段（Lab試作 cc_paper・claude-481）=====
   モックの4段（入り口→テンプレ→確認→できた画像）。プレビューは実寸比のまま拡縮する。 */
.ppr-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 4px; }
.ppr-chip { font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid #e3e0d6; background: #fff; color: #1e2421; }
.ppr-chip.on { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 600; }
.ppr-sws { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 300px; margin-bottom: 4px; }
.ppr-sw { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 1px solid rgba(0,0,0,.18); cursor: pointer; }
.ppr-sw.on { outline: 2px solid #1e2421; outline-offset: 2px; }
.ppr-stage { display: flex; justify-content: center; padding: 14px 0 0; }
.ppr-card { border-radius: 8px; overflow: hidden; box-shadow: 0 14px 34px rgba(30, 36, 33, .18); background: #fff; }
.ppr-card svg { display: block; width: 100%; height: auto; }
.ppr-yoko { width: 273px; }            /* 91×55mm を 3px/mm で */
.ppr-tate { width: 176px; }            /* 55×91mm を 3.2px/mm で */
.ppr-facts { display: flex; gap: 8px; margin-top: 14px; }
.ppr-fact { flex: 1; background: #fff; border: 1px solid #e3e0d6; border-radius: 11px; padding: 10px 12px; }
.ppr-fact b { display: block; font-size: 14px; color: #0f766e; }
.ppr-fact span { font-size: 10.5px; color: #6b7280; line-height: 1.55; }
.ppr-note { background: #f7f5ee; border-radius: 11px; padding: 12px 14px; font-size: 12px;
  color: #6b7280; line-height: 1.75; margin-top: 12px; }
.ppr-note b { color: #1e2421; }
.ppr-done-h { font-size: 20px; font-weight: 600; margin: 6px 0 0; }
.ppr-done-img { max-width: 260px; width: 100%; height: auto; display: block; border-radius: 6px;
  box-shadow: 0 14px 34px rgba(30, 36, 33, .18); }
.ppr-plain { font-size: 11.5px; color: #6b7280; line-height: 1.7; }
.ppr-referral { margin-top: 16px; padding: 15px; border: 1px solid rgba(15, 118, 110, .3);
  border-radius: 13px; background: #f3faf8; display: flex; flex-direction: column; gap: 9px; }
.ppr-referral > b { color: #0b5f59; font-size: 15px; }
.ppr-referral p { margin: 0; color: #53615d; font-size: 11.5px; line-height: 1.7; }
.ppr-referral .primary-button, .ppr-referral .ghost-button { width: 100%; margin: 0; }
.ppr-referral-status { padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .72); }
.ppr-referral-label { display: flex; flex-direction: column; gap: 5px; color: #374151; font-size: 12px; }
.ppr-referral-label input, .ppr-referral-label textarea { box-sizing: border-box; width: 100%; padding: 10px 11px;
  border: 1px solid #d8ddd9; border-radius: 9px; background: #fff; color: #1e2421; font: inherit; }
.ppr-referral-label textarea { resize: vertical; }
/* 写真の位置＝大きさの倍率を、−と＋のあいだに置く（claude-503） */
.ppr-zoomrow { align-items: center; }
.ppr-scale { font-size: 12.5px; color: #374151; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
/* Proを買った人の面（claude-517）＝売り場ではなく、事実の置き場 */
.pi-owned { border: 1px solid rgba(15, 118, 110, .35); border-radius: 14px; background: #f4faf8; }
.pi-owned-badge { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #0f766e; margin: 0 0 6px; }
.pi-owned-lead { font-size: 15px; font-weight: 700; color: #16211d; margin: 0 0 10px; }
.pi-owned .pi-trust-list { margin-bottom: 10px; }
#settingsSeeProButton.is-owned { color: #0b5f59; }

/* 顔写真（claude-512）：丸く出す＝一覧・連絡先カードと同じ形 */
.face-row { display: flex; align-items: center; gap: 12px; }
.face-thumb { width: 64px; height: 64px; border-radius: 50%; background-size: cover; background-position: center;
  border: 1px solid rgba(15, 40, 35, .12); flex: 0 0 auto; }
.face-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.face-actions .ghost-button { flex: 1 1 auto; }
.log-thumb.is-face { border-radius: 50%; object-fit: cover; }
#cdIdentityAvatar.has-face { background-size: cover; background-position: center; color: transparent; }

/* 実物の名刺（claude-507）：self画面の欄と、フルスクリーン表示 */
.real-card-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.real-card-thumb { width: 100%; max-height: 180px; object-fit: contain; border-radius: 10px;
  border: 1px solid rgba(15, 40, 35, .12); background: #fff; }
.real-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.real-card-actions .ghost-button { flex: 1 1 auto; }
.real-card-note { font-size: 11.5px; color: #6b7280; line-height: 1.7; margin: 0; }
.real-card-show { position: fixed; inset: 0; z-index: 1300; background: rgba(10, 14, 12, .95);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.real-card-show[hidden] { display: none; }
.real-card-show img { max-width: 96vw; max-height: 82vh; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); background: #fff; }
.real-card-show-hint { color: rgba(255, 255, 255, .65); font-size: 12px; margin: 0; }

/* 同じ会社の人を見る（claude-506）＝会社欄の直下・控えめに */
.cd-company-others { align-self: flex-start; margin: -6px 0 4px; font-size: 13px; }
.ppr-stage-top { position: sticky; top: 0; z-index: 2; background: #f4f6f2;
  padding: 6px 0 12px; margin-bottom: 4px; }
/* 色のパレット＝落ち着いた／あざやか（claude-499）。名前を付けて2段に分ける */
.ppr-pal { margin: 2px 0 8px; }
.ppr-pal-name { display: block; font-size: 10.5px; color: #66736e; letter-spacing: .04em; margin-bottom: 5px; }
.ppr-pal .ppr-sws { max-width: none; }

/* 2色チップ（claude-490）＝丸ではなく名刺の形。押す前に「その色にしたらこう見える」が分かる */
.ppr-sws.is-card { display: flex; flex-wrap: wrap; gap: 9px; max-width: none; }
.ppr-sw2 { width: 40px; height: 26px; border-radius: 4px; padding: 0; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .16); }
.ppr-sw2.is-tate { width: 26px; height: 40px; }
.ppr-sw2.on { outline: 2px solid #1e2421; outline-offset: 2px; }

/* かたち＝見本で選ぶ（claude-485）。横に流して、押したものに枠。本人データの縮小版なので何が変わるか一目で分かる */
.ppr-katas { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; margin: 0 -2px 4px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ppr-kata { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; padding: 4px; cursor: pointer; scroll-snap-align: start; }
.ppr-kata-thumb { display: block; width: 104px; border-radius: 6px; overflow: hidden; background: #fff;
  border: 2px solid transparent; box-shadow: 0 4px 12px rgba(30, 36, 33, .12); }
.ppr-kata.is-tate .ppr-kata-thumb { width: 66px; }
.ppr-kata-thumb svg { display: block; width: 100%; height: auto; }
.ppr-kata-label { font-size: 11.5px; color: #66736e; }
.ppr-kata.on .ppr-kata-thumb { border-color: #0f766e; box-shadow: 0 0 0 2px rgba(15, 118, 110, .25), 0 4px 12px rgba(30, 36, 33, .12); }
.ppr-kata.on .ppr-kata-label { color: #0f766e; font-weight: 600; }
.ppr-chip:focus-visible, .ppr-kata:focus-visible, .ppr-sw:focus-visible, .ppr-sw2:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .35); outline-offset: 3px; }

/* 入り口の一度きり案内（claude-484）＝bodyぶら下げの固定レイヤー（.ov2-spot/.ov2-tipを流用） */
#paperGuide { position: fixed; inset: 0; z-index: 1300; pointer-events: none; }
#paperGuide .ov2-tip { pointer-events: auto; }

/* 押して大きく見る（claude-482）。紙は刷ってから気づけないので、小さいまま決めさせない */
.ppr-stage, .ppr-done-img { cursor: zoom-in; }
.ppr-zoom { position: fixed; inset: 0; z-index: 1200; background: rgba(16, 20, 18, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 18px; cursor: zoom-out; }
.ppr-zoom[hidden] { display: none; }
.ppr-zoom-inner { max-width: 100%; max-height: 82vh; display: flex; align-items: center; justify-content: center; }
.ppr-zoom-inner img { max-width: 100%; max-height: 82vh; width: auto; height: auto;
  border-radius: 6px; box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
.ppr-zoom-hint { color: rgba(255, 255, 255, .7); font-size: 12px; margin: 0; }
/* 拡大時のカード＝画面の幅いっぱい（縦は高さで止める） */
.ppr-big { width: min(88vw, 520px); box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
.ppr-big.ppr-tate { width: min(62vw, 330px); }


/* ===== メール・電話の2つ目（claude-494・実ユーザーFB「メールアドレスもうひとつ載せたい」）=====
   紙の名刺は会社と個人の2つが普通（電話は特に）。種別を付けるので、相手はどちらに送るか迷わない。 */
/* 2つ目は枠で囲む（claude-502・矢野8/20実機「どっちのチップか分からない」）
   ＝1つ目の「どの名刺に載せるか」と、2つ目の入力欄が地続きに見えていた。塊にして所属を目で分ける。 */
.contact2 { margin-top: 10px; padding: 11px 12px 12px; background: #faf9f6;
  border: 1px solid #e3e0d6; border-radius: 11px; }
.contact2[hidden] { display: none; }
.contact2-lead { display: block; font-size: 11px; color: var(--muted, #6b7280); margin-bottom: 6px; }
/* どの名刺に載せるか（claude-497）＝名刺の名前をチップで出し、押してオン/オフ */
.on-cards { margin-top: 7px; }
.on-cards[hidden] { display: none; }
.on-cards-lead { display: block; font-size: 11px; color: var(--muted, #6b7280); margin-bottom: 5px; }
.on-cards-row { display: flex; flex-wrap: wrap; gap: 6px; }
.on-cards-row .oc { font: inherit; font-size: 12px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid #dbe1dc; background: #fff; color: #66736e; cursor: pointer; }
.on-cards-row .oc.is-on { background: var(--accent, #0f766e); border-color: var(--accent, #0f766e);
  color: #fff; font-weight: 600; }
.link-add-btn { margin-top: 9px; background: #fff; border: 1px solid var(--accent, #0f766e); border-radius: 999px;
  padding: 8px 15px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent, #0f766e); cursor: pointer; }
.link-add-btn:active { background: #e6f3f0; }
/* ★ボタンに見せる（claude-502・矢野8/20実機「ただの文字かなと思って全然気づかなかった」）。
   枠のない文字は、押せることが伝わらない。 */
.link-remove-btn { margin-top: 9px; background: #fff; border: 1px solid #dbe1dc; border-radius: 999px;
  padding: 7px 15px; font: inherit; font-size: 12.5px; color: var(--muted, #6b7280); cursor: pointer; }
.link-remove-btn:active { background: #f2f0ea; }

/* 相手の名刺を大きく見る（claude-523）＝読める大きさで見せて、その場で切り直す。
   名刺が読めなければ、読み取りの間違いに気づくことも直すこともできない（矢野8/23）。 */
.card-zoom { position: fixed; inset: 0; z-index: 1300; background: rgba(10, 14, 12, .96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.card-zoom[hidden] { display: none; }
.card-zoom-stage { flex: 1 1 auto; inline-size: 100%; display: grid; place-items: center;
  overflow: hidden; touch-action: none; }
.card-zoom-stage img { max-inline-size: 100%; max-block-size: 100%; inline-size: auto; block-size: auto;
  border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); transform-origin: center center;
  transition: transform .18s ease; will-change: transform; user-select: none; -webkit-user-drag: none; }
.card-zoom-stage.is-zoomed img { transition: none; cursor: grab; }
.card-zoom-bar { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.card-zoom-bar .ghost-button { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); }
.card-zoom-hint { color: rgba(255, 255, 255, .6); font-size: 11.5px; margin: 0; text-align: center; }
/* 連絡先の名刺画像＝押せることが分かる（claude-523） */
.cd-card-img { cursor: zoom-in; }
.cd-card-zoomcue { position: absolute; inset-block-end: 8px; inset-inline-start: 8px;
  background: rgba(10, 14, 12, .6); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; pointer-events: none; letter-spacing: .02em; }

/* メール欄＝標準の入力欄のまま、カーソルが当てやすい形に（claude-526・矢野8/23
   「フォームでの文字移動がしやすければいい」＝新しいUIは作らない。字を大きく・字間を広げるだけ）。
   等幅＋大きめ＋広い字間＝1字の前を指で狙える。iOSはfont-size16px未満でフォーカス時に拡大が走る罠もある。 */
#emailInput, #cdEmail { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 18px; letter-spacing: .09em; }
