/* またねっと Phase 1 本番スタイル
   出典= docs/design/mockups/assets/style.css（視覚の正）からの**値の移植**。
   DESIGN-phase1.md §7 / §7.1 準拠: モバイル(375px)を正、max-width 480pxで中央寄せ。
   配色は §7.1 のブランドトークンに固定（テテマーチ実測色）。
   ロック・マスク表現には --color-brand（赤橙系）を使わない（PR3・§7.1「引き続きの制約」）。

   モック専用の3種は移植しない（製品UIではないため）:
   - `.state-switch`（検収用の状態切替バー）
   - `.mock-frame`（モックの外枠。本番は `.app-shell` が枠の役割を兼ねる）
   - `.screen-state` / `.mock-note`（1ファイルに全状態を並べるモック都合の器と注記） */

:root {
  /* --- §7.1 ブランドトークン（固定・出典= DESIGN §7.1 表） --- */
  --color-brand: #FF4B00;
  --color-brand-dark: #D93F00;
  --color-brand-tint: #FFF0E8;
  --color-accent-yellow: #FFC000;
  --color-accent-green: #B0E000;
  --color-accent-orange: #FF8A3D;
  --grad-brand: linear-gradient(135deg, #FF4B00, #FFC000 60%, #B0E000);
  --color-ink: #231815;
  --color-bg: #FDFAF6;
  --color-surface: #FFFFFF;

  /* --- 派生トークン --- */
  --color-surface-alt: #FBF2EA;
  --color-text: var(--color-ink);
  --color-text-muted: #7A6A63;
  --color-text-faint: #A3948C;
  --color-border: #F0E2D6;

  --color-info-bg: #FDF1E0;
  --color-info-text: #8A5A10;
  --color-success-bg: #EEF6DC;
  --color-success-text: #4C6B12;
  --color-warn-bg: #FFF3D2;
  --color-warn-text: #8A5A10;
  --color-friend-bg: #FFE8D6;
  --color-friend-text: #B85A1E;

  /* ロック・マスクは常に温かいグレー系のまま（ブランド色・赤系を使わない＝不変条件） */
  --color-lock-bg: #F1ECE7;
  --color-lock-text: #6E645E;
  --color-lock-border: #DDD1C6;

  /* 地図（海）専用の派生トークン */
  --color-map-sea: #DCEEF5;
  --color-map-sea-border: #C6E0EA;

  --color-badge-update-text: var(--color-ink);

  --radius-input: 12px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --tap-min: 44px;
  --shadow-card: 0 2px 10px rgba(35, 24, 21, 0.07), 0 1px 2px rgba(35, 24, 21, 0.05);
  --shadow-card-hover: 0 8px 20px rgba(35, 24, 21, 0.12);
  --shadow-fab: 0 6px 16px rgba(255, 75, 0, 0.35);

  --font-rounded: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;

  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  justify-content: center;
}

/* モックの `.mock-frame` が持っていた枠（幅・中央寄せ）を本番では app-shell が兼ねる */
.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--color-bg);
  overflow-x: hidden;
}

main {
  flex: 1;
  padding: 16px 16px 24px;
}

a { color: var(--color-brand); }

img, svg { max-width: 100%; }

/* --- ヘッダー --- */
.app-header {
  padding: 14px 16px 10px;
  background: var(--color-surface);
  margin: 0 -16px 16px;
  border-radius: 0;
}
.app-name {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-rounded);
}
.app-header h1 {
  margin: 0;
  font-size: 19px;
  font-family: var(--font-rounded);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: 6px;
}

/* --- ボタン（ピル型 999px・押下でわずかに縮む） --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-rounded);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--color-brand); color: #fff; }
.btn-primary:hover { background: var(--color-brand-dark); }
.btn-accent { background-image: var(--grad-brand); color: #fff; }
.btn-accent:hover { filter: brightness(0.96); }
.btn-secondary { background: var(--color-surface); color: var(--color-brand); border-color: var(--color-brand); }
.btn-ghost { background: var(--color-surface-alt); color: var(--color-text-muted); border-color: transparent; }
.btn-text { background: none; border: none; color: var(--color-brand); font-weight: 700; font-family: var(--font-rounded); padding: 10px 4px; min-height: var(--tap-min); }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* --- カード（角丸20px・罫線でなく面と影で区切る） --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: 20px 0 8px;
  letter-spacing: 0.02em;
  font-family: var(--font-rounded);
}
.section-title:first-child { margin-top: 4px; }

/* --- 会員カード --- */
.member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: var(--tap-min);
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-brand-tint);
  color: var(--color-brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-rounded);
  flex-shrink: 0;
  font-size: 15px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-card .meta { min-width: 0; }
.member-card .name { font-weight: 700; font-size: 15px; font-family: var(--font-rounded); }
.member-card .role { font-size: 12px; color: var(--color-text-muted); }

/* --- 重なりアバター --- */
.avatar-stack { display: inline-flex; flex-shrink: 0; }
.avatar-stack .avatar { border: 2px solid var(--color-surface); }
.avatar-stack .avatar:not(:first-child) { margin-left: -10px; }

/* --- 種別バッジ --- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-rounded);
}
.badge-transition { background-image: var(--grad-brand); color: #fff; }
.badge-update { background: var(--color-accent-green); color: var(--color-badge-update-text); }
.badge-draft { background: var(--color-surface-alt); color: var(--color-text-faint); }
.badge-warn { background: var(--color-warn-bg); color: var(--color-warn-text); }
.badge-connection { background: var(--color-info-bg); color: var(--color-info-text); }

/* --- つながり種別バッジ3種 --- */
.badge-conn-working { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-conn-worked { background: var(--color-lock-bg); color: var(--color-lock-text); }
.badge-conn-friend { background: var(--color-friend-bg); color: var(--color-friend-text); }

/* --- 「つながりを申請」ボタン --- */
.collab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-rounded);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease;
}
.collab-btn:active { transform: scale(0.96); }
.collab-btn.pending { background: var(--color-info-bg); color: var(--color-info-text); border-color: transparent; }
.collab-btn.confirmed { background: var(--color-success-bg); color: var(--color-success-text); border-color: transparent; }

/* --- ログカード --- */
.log-card {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.log-card .top-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.log-card .writer { font-size: 13px; color: var(--color-text-muted); }
.log-card h3 { margin: 0 0 6px; font-size: 16px; font-family: var(--font-rounded); }
.log-card p.preview { margin: 0 0 8px; color: var(--color-text-muted); font-size: 14px; }
.log-card .reactions-mini { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-family: var(--font-rounded);
  font-weight: 700;
}

/* 転職ログのカードに小さな祝い装飾（CSSのみのドット紙吹雪） */
.log-card:has(.badge-transition)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle 3px, var(--color-brand) 99%, transparent 100%),
    radial-gradient(circle 2.5px, var(--color-accent-yellow) 99%, transparent 100%),
    radial-gradient(circle 3px, var(--color-accent-green) 99%, transparent 100%),
    radial-gradient(circle 2px, var(--color-brand) 99%, transparent 100%),
    radial-gradient(circle 2.5px, var(--color-accent-yellow) 99%, transparent 100%),
    radial-gradient(circle 2px, var(--color-accent-green) 99%, transparent 100%);
  background-repeat: no-repeat;
  background-position:
    94% 12%, 86% 24%, 97% 36%, 90% 8%, 80% 18%, 92% 46%;
  opacity: 0.55;
}

@media (hover: hover) {
  .card:hover, .log-card:hover, .choice-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
  }
}

/* --- マスクブロック（PR3: --color-brand・赤系を使わない） --- */
.mask-block {
  background: var(--color-lock-bg);
  border: 1px dashed var(--color-lock-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}
.mask-block .mask-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mask-block .lock-icon { font-size: 16px; }
.mask-block .mask-body {
  height: 46px;
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, #E7DFD8, #E7DFD8 8px, #EFE9E3 8px, #EFE9E3 16px);
  margin: 8px 0 10px;
}
.mask-block .restore-cta {
  font-size: 13px;
  color: var(--color-lock-text);
  font-weight: 700;
}

/* --- 汎用の中立通知ブロック（エラー色を使わない） --- */
.notice-block {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  color: var(--color-text);
}
.notice-block p { margin: 0; }

/* --- S20 全画面版の中央寄せ器（503-full・404）。
       出典= mockups S20-error.html のインラインstyle（値の移植） --- */
.center-pane {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.center-pane-text { font-size: 15px; margin-bottom: 14px; }

/* --- 復帰CTAバナー（PR3: 罰でなく招待） --- */
.restore-banner {
  background: var(--color-brand-tint);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.restore-banner p { margin: 0; font-size: 14px; color: var(--color-brand-dark); font-weight: 700; font-family: var(--font-rounded); }

/* --- 公開範囲ラベル（PR4） --- */
.scope-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-info-text);
  background: var(--color-info-bg);
  border-radius: 999px;
  padding: 5px 12px;
  margin: 6px 0 14px;
  font-weight: 700;
  font-family: var(--font-rounded);
}

/* --- リアクションバー --- */
.reaction-bar-scroll {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.reaction-chip-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  font-family: var(--font-rounded);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.reaction-chip-btn.active {
  background: var(--color-brand-tint);
  border-color: var(--color-brand-tint);
  color: var(--color-brand-dark);
  font-weight: 700;
}
@keyframes reaction-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.reaction-chip-btn:active { animation: reaction-pop 0.28s ease; }

/* --- 状態バナー: 情報色・成功色のみ --- */
.banner { border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.banner-info { background: var(--color-info-bg); color: var(--color-info-text); }
.banner-success { background: var(--color-success-bg); color: var(--color-success-text); }
.banner p { margin: 0 0 8px; }
.banner p:last-child { margin-bottom: 0; }
.banner strong { display: block; margin-bottom: 4px; font-family: var(--font-rounded); }

/* --- 同意ブロック --- */
.consent-block { background: var(--color-surface); border-radius: var(--radius-lg); padding: 14px; margin: 14px 0; box-shadow: var(--shadow-card); }
.consent-version { font-size: 12px; color: var(--color-text-faint); margin-bottom: 8px; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: 14px; }
.consent-check input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; accent-color: var(--color-brand); }

/* --- 確認ダイアログ --- */
.confirm-dialog {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 10px;
  box-shadow: var(--shadow-card);
}
.confirm-dialog h2 { margin: 0 0 10px; font-size: 17px; font-family: var(--font-rounded); }
.confirm-dialog p { font-size: 14px; color: var(--color-text-muted); }

/* --- テーブル（法定表示・逐語文言のため構造を維持） --- */
table.matrix { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
table.matrix th, table.matrix td { border: 1px solid var(--color-border); padding: 8px 10px; text-align: left; vertical-align: top; }
table.matrix th { background: var(--color-surface-alt); font-weight: 700; width: 38%; font-family: var(--font-rounded); }

/* --- フォーム --- */
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; font-family: var(--font-rounded); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="file"],
.form-field input[type="month"],
.form-field input[type="url"],
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: 10px 12px;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border);
  font-size: 15px;
  background: var(--color-surface);
  font-family: inherit;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
}
.form-field textarea { min-height: 80px; }
.form-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }
/* P-25: 招待経由の自動入力・編集不可。ロック系トークンを使用 */
.form-field input[readonly] { background: var(--color-lock-bg); color: var(--color-lock-text); border-color: var(--color-lock-border); }

/* --- 在籍期間フィールド --- */
.period-field-btn { width: 100%; min-height: var(--tap-min); padding: 10px 12px; border-radius: var(--radius-input); border: 1px solid var(--color-border); background: var(--color-surface); font-size: 15px; text-align: left; font-family: inherit; color: var(--color-text); display: flex; justify-content: space-between; align-items: center; text-decoration: none; }
.period-field-btn .chev { color: var(--color-text-faint); font-size: 13px; }
/* 年月の2列（`YYYY-MM` を年selectと月selectで組む。値の形式はDDLの 'YYYY-MM' に一致させる） */
.period-selects { display: flex; gap: 8px; }
.period-selects select { flex: 1; min-width: 0; }
.badge-required { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--color-warn-bg); color: var(--color-warn-text); font-size: 10px; font-weight: 700; }

.form-error { font-size: 12px; color: var(--color-brand-dark); margin-top: 6px; font-weight: 700; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; }

/* --- 選択カード --- */
.choice-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--color-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.choice-card:active { transform: scale(0.98); }
.choice-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--color-brand); font-family: var(--font-rounded); }
.choice-card p { margin: 0; font-size: 13px; color: var(--color-text-muted); }

/* --- 機微ガイド（常設・折りたたみ不可） --- */
.guide-block {
  background: var(--color-warn-bg);
  color: var(--color-warn-text);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0;
  font-size: 13px;
  font-weight: 700;
}

/* --- 下部固定タブ --- */
.bottom-nav {
  display: flex;
  background: var(--color-surface);
  box-shadow: 0 -2px 14px rgba(35, 24, 21, 0.10);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 20;
}
/* 固定ナビが最終コンテンツに被らないよう本文側に余白を確保 */
.app-shell:has(.bottom-nav) main { padding-bottom: 104px; }
.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--tap-min);
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 10px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  transition: transform 0.1s ease;
}
.bottom-nav .nav-item:active { transform: scale(0.94); }
.bottom-nav .nav-icon { font-size: 18px; }
/* 中央FABは＋のみの丸ボタン、ラベルはボタン外の直下に分離 */
.bottom-nav .nav-cta-wrap { gap: 4px; }
.bottom-nav .nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 999px;
  margin-top: -22px;
  width: 56px;
  height: 56px;
  box-shadow: 0 8px 20px rgba(255, 75, 0, 0.4);
  border: 3px solid var(--color-bg);
  text-decoration: none;
  transition: transform 0.1s ease;
}
.bottom-nav .nav-cta:active { transform: scale(0.94); }
.bottom-nav .nav-cta .nav-icon { font-size: 22px; }
.bottom-nav .nav-cta-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-brand-dark);
  font-family: var(--font-rounded);
  white-space: nowrap;
}
.bottom-nav .nav-item[aria-current="page"] { color: var(--color-brand); font-weight: 700; }

/* --- タブ --- */
.tabbar { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--color-border); }
.tabbar a { flex: 1; text-align: center; padding: 10px 4px; min-height: var(--tap-min); display: flex; align-items: center; justify-content: center; font-size: 13px; text-decoration: none; color: var(--color-text-muted); border-bottom: 2px solid transparent; font-family: var(--font-rounded); }
.tabbar a[aria-current="true"] { color: var(--color-brand); border-bottom-color: var(--color-brand); font-weight: 700; }
.btn-primary .tab-badge { background: #fff; color: var(--color-brand); min-width: 20px; height: 20px; margin-left: 8px; font-weight: 800; }
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--color-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-rounded);
}

/* --- つながりネットワーク図 --- */
.network-graph {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 4px 0 10px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  overflow-y: hidden;
}
.network-graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.network-graph .edge { stroke-width: 2; }
.network-graph .edge-working { stroke: var(--color-accent-green); stroke-width: 2.5; stroke-dasharray: none; }
.network-graph .edge-worked { stroke: var(--color-text-faint); stroke-dasharray: none; }
.network-graph .edge-friend { stroke: var(--color-accent-orange); stroke-dasharray: 5 4; }
.graph-node {
  position: absolute;
  transform: translate(-50%, -50%);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.graph-node .avatar { box-shadow: 0 2px 6px rgba(35, 24, 21, 0.15); }
.graph-node-center { z-index: 2; }
.graph-node-center .avatar {
  width: 56px;
  height: 56px;
  font-size: 19px;
  border: 3px solid var(--color-brand);
}
.graph-node-label { font-size: 10px; color: var(--color-text-muted); background: var(--color-surface); padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.graph-legend { display: flex; gap: 14px; font-size: 11px; color: var(--color-text-muted); margin: 0 0 6px; flex-wrap: wrap; }
.graph-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-line { display: inline-block; width: 18px; height: 0; }
.legend-line-working { border-top: 2.5px solid var(--color-accent-green); }
.legend-line-worked { border-top: 2px solid var(--color-text-faint); }
.legend-line-friend { border-top: 2px dashed var(--color-accent-orange); }

.filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-pill { font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text-muted); background: var(--color-surface); min-height: 32px; display: inline-flex; align-items: center; transition: transform 0.1s ease; }
.filter-pill:active { transform: scale(0.95); }
.filter-pill[aria-current="true"] { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }

.search-box { display: flex; gap: 8px; margin-bottom: 14px; }
.search-box input { flex: 1; min-height: var(--tap-min); border-radius: var(--radius-pill); border: 1px solid var(--color-border); padding: 0 16px; font-size: 15px; }

/* S12 協業メンションの選択行（mockups S12-mention のカード＋チェックボックス） */
.mention-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mention-row .member-card { flex: 1; }
.mention-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }

.empty-state { text-align: center; padding: 48px 16px; color: var(--color-text-muted); }
.empty-state .icon { font-size: 32px; margin-bottom: 10px; }

.divider { border: none; border-top: 1px solid var(--color-border); margin: 18px 0; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.list-row:last-child { border-bottom: none; }
.list-row .label { font-size: 14px; font-weight: 600; }
.list-row .value { font-size: 13px; color: var(--color-text-muted); }

.timeline-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-brand); margin-top: 6px; flex-shrink: 0; }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin-bottom: 8px; }

.status-pill { display: inline-flex; align-items: center; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-family: var(--font-rounded); }
.status-pill.ok { background: var(--color-success-bg); color: var(--color-success-text); }
.status-pill.info { background: var(--color-info-bg); color: var(--color-info-text); }
.status-pill.neutral { background: var(--color-surface-alt); color: var(--color-text-muted); }

.qr-code { width: 160px; height: 160px; margin: 14px auto; display: block; background: #fff; border: 6px solid #fff; outline: 1px solid var(--color-border); border-radius: var(--radius-md); }

/* --- 名前順フラットリスト行 --- */
.directory-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.directory-row .member-card {
  flex: 1;
  min-width: 0;
}
.directory-row .member-card .meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.directory-row .member-card .name,
.directory-row .member-card .role {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.directory-row > .collab-btn,
.directory-row > .badge,
.directory-row > button.collab-btn {
  flex-shrink: 0;
}

/* --- Q&A --- */
.qa-question {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.qa-answer {
  margin: 0;
  font-size: 14px;
}

/* --- 簡略地図 --- */
.map-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 4px 0 10px;
  background: var(--color-map-sea);
  border: 1px solid var(--color-map-sea-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.map-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-shape { fill: var(--color-brand-tint); stroke: var(--color-brand-dark); stroke-width: 1.5; stroke-opacity: 0.25; stroke-linejoin: round; }
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  justify-content: center;
}
.map-pin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-rounded);
  box-shadow: 0 2px 6px rgba(35, 24, 21, 0.15);
}
.map-pin-label {
  font-size: 10px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- 一覧ツールバー --- */
.list-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.list-toolbar .toolbar-sort { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); font-family: var(--font-rounded); flex: 1 1 auto; min-width: 0; }
.list-toolbar .toolbar-sort select {
  flex: 1;
  min-width: 0;
  min-height: var(--tap-min);
  padding: 8px 10px;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border);
  font-size: 13px;
  background: var(--color-surface);
  font-family: inherit;
  color: var(--color-text);
}
.list-toolbar .toolbar-sort select:focus { outline: 2px solid var(--color-brand); outline-offset: 1px; }
.toolbar-filter-btn { flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
.toolbar-panel { background: var(--color-surface-alt); border-radius: var(--radius-md); padding: 12px; margin: 0 0 14px; }
.toolbar-panel .form-field { margin-bottom: 10px; }
.toolbar-panel .form-field:last-child { margin-bottom: 0; }
.toolbar-panel .search-box { margin-bottom: 0; }

/* --- 通知のXフィード型行構造 --- */
.notif-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 4px; }
.notif-chip { width: 44px; height: 44px; border-radius: 50%; background: var(--color-surface-alt); color: var(--color-text-muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; font-family: var(--font-rounded); flex-shrink: 0; }
.notif-main { flex: 1; min-width: 0; }
.notif-name { margin: 0 0 3px; font-size: 13px; font-weight: 800; font-family: var(--font-rounded); }
.notif-text { margin: 0; font-size: 14px; }
.notif-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.notif-target-link { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-preview-line { display: block; margin: 4px 0 0; font-size: 13px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 見出し・UI要素は丸ゴシック（§7.1） --- */
h1, h2, h3 { font-family: var(--font-rounded); }

/* --- 法務文書と同意画面からの全文リンク --- */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0;
  font-size: 13px;
}
.legal-links a,
.legal-nav a { color: #C93A00; font-weight: 700; }
.legal-links span { color: var(--color-text-faint); }
.app-shell.legal-shell { max-width: 780px; padding-bottom: 48px; }
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 700;
}
.legal-document {
  padding: 20px;
  background: var(--color-surface);
  overflow-wrap: anywhere;
}
.legal-document h1 { margin: 4px 0 18px; font-size: 24px; line-height: 1.45; }
.legal-document h2 { margin: 34px 0 14px; padding-top: 4px; font-size: 20px; line-height: 1.5; }
.legal-document h3 { margin: 26px 0 10px; font-size: 17px; line-height: 1.5; }
.legal-document p,
.legal-document li { font-size: 14px; line-height: 1.9; }
.legal-document p { margin: 0 0 14px; }
.legal-document ol,
.legal-document ul { margin: 0 0 18px; padding-left: 1.5em; }
.legal-document blockquote {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
}
.legal-document blockquote ul { margin: 0; }
.legal-document table {
  width: 100%;
  margin: 12px 0 22px;
  border-collapse: collapse;
  font-size: 13px;
}
.legal-document th,
.legal-document td {
  padding: 10px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.legal-document th { background: var(--color-surface-alt); }
.legal-document code { padding: 1px 5px; border-radius: 4px; background: var(--color-surface-alt); }
.legal-hash { margin: 28px 0 0; color: var(--color-text-muted); font-size: 11px; word-break: break-all; }

/* --- PCビュー（DESIGN §7 P-23 / DD-10・SPEC §0 D14） ---
   PC専用レイアウトは作らない。モバイル幅(480px)の中央固定カラムをそのまま置き、
   はみ出したサイドは薄色背景で埋める（`.bottom-nav` は既に left:50% で同じ幅に固定済み）。 */
@media (min-width: 481px) {
  html, body { background: var(--color-surface-alt); }
  .app-shell { box-shadow: 0 0 0 1px var(--color-border); margin: 0 auto; }
  .app-shell.legal-shell { max-width: 780px; }
}
