/* ============================================
   coicier (恋シェル) — App stylesheet
   Brand palette: Coral pink #fe6970 (primary) + warm brown #967e7a (text accent)
   原デザイン common.css / style.css の配色を踏襲。
   Structure mirrors marie/css/app.css for shared dev.
   ============================================ */

:root {
  /* Brand — coicier coral pink */
  --brand-900: #6b1f24;
  --brand-700: #d04148;
  --brand-600: #fe4951;       /* darker accent / hover / borders */
  --brand-500: #fe6970;       /* PRIMARY — CTA, active nav, links */
  --brand-400: #fe747a;       /* light variant — backgrounds on hover */
  --brand-300: #ffb1b5;
  --brand-200: #fec2c5;       /* soft pink bg */
  --brand-100: #ffe2e4;       /* very light pink */
  --brand-50:  #fff5f6;       /* almost white pink tint */

  /* Accent — warm brown (元coiierの第二ブランドカラー) */
  --accent-900: #4a232f;
  --accent-700: #844055;      /* deep maroon — premium / 強調 */
  --accent-600: #b3666a;
  --accent-500: #967e7a;      /* warm brown — body text 強調, copy */
  --accent-300: #c4ada8;
  --accent-100: #FDAFC9;      /* peachy pink — badge / 装飾 */

  /* Tertiary — small teal accent for special buttons (元 .help-link-btn) */
  --teal-500: #00c4cc;
  --teal-600: #00abb3;

  --warn:   #e57373;
  --info:   #4a90c8;
  --gold:   #d4a847;

  --grad-brand: linear-gradient(135deg, #fe6970 0%, #fe747a 100%);
  --grad-deep:  linear-gradient(135deg, #d04148 0%, #fe6970 100%);
  --grad-soft:  linear-gradient(180deg, #ffffff 0%, #fff5f6 100%);

  /* Neutral */
  --white:    #ffffff;
  --gray-50:  #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eaeaea;
  --gray-300: #d6d9da;
  --gray-400: #9aa1a3;
  --gray-500: #7b7b7b;        /* 元style.cssで多用 */
  --gray-700: #3e4448;

  /* Semantic */
  --bg-app:    #fafafa;
  --bg-card:   #ffffff;
  --text-primary:   #3e4448;
  --text-secondary: #7b7b7b;
  --text-muted:     #9aa1a3;
  --text-warm:      #967e7a;  /* 見出し系・コピー文に */
  --border-color: #eaeaea;
  --border-light: #f5f5f5;

  --shadow-xs: 0 1px 4px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 6px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
  --shadow-brand: 0 6px 20px rgba(0,196,204,.32);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --header-height: 56px;
  --bottom-nav-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: Avenir, "Helvetica Neue", "Segoe UI", "Hiragino Kaku Gothic ProN",
               "YuGothic", "Yu Gothic", Meiryo, sans-serif;
  background: var(--gray-200);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
.hidden { display: none !important; }

/* ========== App shell ========== */
.app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--bg-app);
  box-shadow: 0 0 80px rgba(0,0,0,.15);
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

/* ========== Splash / Login / Register ========== */
.screen-splash {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-100) 100%);
  /* Flex with auto-margin centering: 縦に短ければ中央、超えれば自然にスクロール
     ＆ 上端が切れない (align-items:center だと上方向のオーバーフローが見えなくなる) */
  display: flex;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.login-card, .onboarding-card {
  width: 100%; max-width: 420px;
  margin: auto;          /* flex container 内で auto -> 余白があれば中央、無ければ top 寄せ */
  background: #fff; border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
}
.hero-slideshow {
  position: relative;
  width: calc(100% + 48px);   /* card has 28px-ish padding L/R; bleed to edges */
  margin: -28px -24px 18px;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--brand-100);
}
@media (max-width: 380px) {
  .hero-slideshow { height: 220px; }
}
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;  /* keep heads in frame — favor top of image */
  opacity: 0;
  animation: heroFade 25s infinite;
}
.hero-slide:nth-child(1) { animation-delay:  0s; }
.hero-slide:nth-child(2) { animation-delay:  5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }
.hero-slide:nth-child(4) { animation-delay: 15s; }
.hero-slide:nth-child(5) { animation-delay: 20s; }
@keyframes heroFade {
  0%  { opacity: 0; }
  4%  { opacity: 1; }
  20% { opacity: 1; }
  24% { opacity: 0; }
  100%{ opacity: 0; }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(255,255,255,.85) 100%);
  pointer-events: none;
}

.splash-logo-img {
  display: block; margin: 0 auto 8px;
  max-width: 200px; height: auto;
  position: relative; z-index: 2;
}
.splash-logo-mark {
  font-size: 1.8rem; font-weight: 700; text-align: center;
  color: var(--text-warm); letter-spacing: .04em;
}
.splash-logo-mark span { color: var(--brand-500); }
.splash-tagline {
  font-size: .92rem; text-align: center;
  color: var(--text-warm); margin-top: 6px;
  letter-spacing: .03em;
}
.splash-subline {
  font-size: .76rem; text-align: center;
  color: var(--text-muted); margin-top: 4px;
  letter-spacing: .02em;
}
.splash-sub {
  font-size: .8rem; text-align: center;
  color: var(--text-muted); margin-top: 14px; line-height: 1.7;
}
.safety-banner {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-100) 100%);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: .78rem;
  line-height: 1.55;
}
.safety-banner .safety-icon {
  font-size: 1.2rem; flex-shrink: 0; line-height: 1.4;
}
.safety-banner b { color: var(--brand-700); font-weight: 700; }
.safety-text {
  flex: 1; min-width: 0;
  word-break: keep-all;       /* 日本語の語句中での折り返しを抑制 */
  overflow-wrap: anywhere;    /* どうしてもはみ出すときだけ任意位置で折り返し */
}
.safety-line-1 { white-space: nowrap; }
.safety-line-2 { color: var(--text-secondary); margin-top: 2px; }
@media (max-width: 380px) {
  /* 極狭幅では太字部分も改行を許容（読めれば優先） */
  .safety-line-1 { white-space: normal; }
}

.login-form { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.login-field {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: .95rem;
  background: #fff;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.login-field:focus { border-color: var(--brand-500); }
.btn-login {
  background: var(--brand-500); color: #fff;
  border-radius: var(--radius-full);
  padding: 13px 0; font-weight: 700;
  margin-top: 6px;
  box-shadow: var(--shadow-brand);
  transition: transform .1s, box-shadow .15s;
}
.btn-login:hover { transform: translateY(-1px); }
.login-error {
  color: var(--accent-600); font-size: .82rem;
  min-height: 1em;
}
.login-links {
  display: flex; justify-content: center; gap: 16px;
  font-size: .82rem; color: var(--brand-500);
  margin-top: 12px;
}
.login-links a { text-decoration: underline; }
.demo-hint {
  margin-top: 18px; font-size: .72rem;
  color: var(--text-muted);
  text-align: center; line-height: 1.7;
  background: var(--brand-50);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.onb-title { font-size: 1.1rem; font-weight: 700; color: var(--brand-700); margin-bottom: 6px; }
.onb-sub   { font-size: .82rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 14px; }
.form-label-small {
  font-size: .78rem; color: var(--text-warm); font-weight: 600;
  margin: 0 0 6px; letter-spacing: .02em;
}
/* registration form: each field as its own block with breathing room */
.reg-form { display: flex; flex-direction: column; gap: 14px; }
.reg-field { display: block; }
.reg-opt   { color: var(--text-muted); font-weight: 400; font-size: .72rem; margin-left: 4px; }
.reg-birth-row { display: flex; gap: 8px; }
.reg-birth-row .login-field { flex: 1; }
.reg-gender-row { display: flex; gap: 8px; }
.gender-opt {
  flex: 1; text-align: center; padding: 10px 0; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); cursor: pointer; font-size: .85rem;
  background: #fff;
}
.gender-opt input { display: none; }
.gender-opt input:checked + span { color: var(--brand-500); font-weight: 700; }
.gender-opt:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }

.btn-primary {
  background: var(--brand-500); color: #fff;
  padding: 13px 18px; border-radius: var(--radius-full);
  font-weight: 700; box-shadow: var(--shadow-brand);
  flex: 1;
}
.btn-secondary {
  background: #fff; color: var(--brand-500);
  border: 1px solid var(--brand-500);
  padding: 13px 18px; border-radius: var(--radius-full);
  font-weight: 600;
  flex: 1;
}
.btn-secondary:hover { background: var(--brand-50); }
.reg-note { font-size: .72rem; color: var(--text-muted); margin-top: 10px; line-height: 1.7; text-align: center; }

/* ========== App header ========== */
.app-header {
  height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 50;
}
.header-brand {
  font-size: 1.15rem; font-weight: 700; color: var(--text-warm);
  letter-spacing: .04em;
  display: flex; align-items: center;
}
.header-brand span { color: var(--brand-500); }
.header-brand img { height: 24px; width: auto; }
.header-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.icon-btn {
  background: none; border: none; font-size: 1.2rem; padding: 6px;
  color: var(--text-secondary); width: 36px; text-align: center;
}

/* ========== Screens ========== */
.screen { display: none; min-height: calc(100vh - var(--bottom-nav-height)); }
.screen.active { display: block; }

/* ========== Home ========== */
.home-greeting { padding: 18px 16px 8px; }
.greet-line { font-size: .85rem; color: var(--text-secondary); }
.greet-name { font-size: 1.3rem; font-weight: 700; color: var(--text-warm); margin-top: 2px; }
.greet-name span { color: var(--brand-500); }

.home-section { padding: 8px 16px 18px; }
.home-section h3 {
  font-size: .92rem; font-weight: 700; color: var(--text-warm);
  margin-bottom: 10px;
}
.home-section h3 .more {
  float: right; font-weight: 500; font-size: .8rem; color: var(--text-secondary);
}
.home-card-row {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 6px;
}
.home-card-row::-webkit-scrollbar { display: none; }
.partner-mini {
  flex: 0 0 110px; background: #fff; border-radius: var(--radius-md);
  padding: 10px 8px; text-align: center; box-shadow: var(--shadow-xs);
  cursor: pointer; transition: transform .12s;
}
.partner-mini:hover { transform: translateY(-2px); }
.partner-mini .pm-avatar {
  width: 64px; height: 64px; margin: 0 auto;
  background: var(--brand-50); border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--brand-100);
}
/* Make any avatar img/svg fill the round container */
.avatar-img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.partner-mini .pm-name { font-weight: 700; font-size: .85rem; margin-top: 8px; }
.partner-mini .pm-meta { font-size: .72rem; color: var(--text-secondary); }

/* ========== Search ========== */
.search-filter { padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--border-color); }
.search-input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border-color); background: var(--gray-50);
  font-size: .9rem;
}
.search-detail-toggle {
  width: 100%; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .88rem; color: var(--text-primary);
}
.sdt-icon { color: var(--brand-500); }
.sdt-count { color: var(--accent-500); font-weight: 700; margin-left: 6px; }
.search-detail-panel { background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.sdp-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.sdp-k { width: 76px; font-size: .82rem; color: var(--text-secondary); flex-shrink: 0; }
.sdp-sel, .sdp-input {
  flex: 1; border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: .85rem; background: #fff;
}
.sdp-sep { color: var(--text-muted); font-size: .8rem; }
.sdp-cp-section {
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
.sdp-cp-label {
  font-size: .82rem; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 600;
}
.sdp-cp-section .chip-row {
  max-height: 200px; overflow-y: auto;
  padding: 4px 0;
}
.sdp-checkbox-group {
  display: flex; flex-direction: column; gap: 8px;
}
.sdp-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text-primary);
  cursor: pointer; padding: 4px 0;
}
.sdp-check input { accent-color: var(--brand-500); }

.ai-badge {
  display: inline-block;
  font-size: .62rem; font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fff4d6 0%, #ffe5b3 100%);
  color: #946800;
  border: 1px solid rgba(180, 130, 0, .25);
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: help;
}

.search-result-summary {
  padding: 12px 16px; font-size: .85rem;
  color: var(--text-secondary);
  background: var(--brand-50);
  border-bottom: 1px solid var(--border-color);
}
.search-result-summary.tight { color: var(--brand-700); }
.search-result-summary b { color: var(--text-primary); font-weight: 700; }

.sdp-actions {
  display: flex; gap: 8px; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid var(--border-color);
}
.sdp-reset, .sdp-apply {
  flex: 1; padding: 10px 0; border-radius: var(--radius-full); font-weight: 700; font-size: .9rem;
}
.sdp-reset { background: var(--gray-100); color: var(--text-secondary); }
.sdp-apply { background: var(--brand-500); color: #fff; }

.partner-grid {
  padding: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.partner-card {
  background: #fff; border-radius: var(--radius-md);
  padding: 14px 12px; text-align: center;
  box-shadow: var(--shadow-xs); cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.partner-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.partner-avatar {
  width: 84px; height: 84px; margin: 0 auto;
  background: var(--brand-50);
  border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--brand-100);
}
.partner-name { font-weight: 700; margin-top: 10px; font-size: .95rem; color: var(--text-warm); }
.partner-meta { font-size: .76rem; color: var(--text-secondary); margin-top: 2px; }
.partner-tags { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.partner-tags .tag {
  font-size: .68rem; padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--brand-100); color: var(--brand-700);
}

.empty-state {
  padding: 40px 24px; text-align: center; color: var(--text-muted); font-size: .85rem;
}

/* ========== Detail ========== */
.detail-hero {
  position: relative; height: 220px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
}
.detail-avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  background: #fff;
}
.detail-avatar .avatar-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.detail-back {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.92); color: var(--brand-500);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.detail-meta { padding: 16px; background: #fff; border-bottom: 1px solid var(--border-color); }
.name-row {
  display: flex; align-items: baseline; gap: 8px;
}
.name { font-size: 1.3rem; font-weight: 700; }
.age { color: var(--text-secondary); font-weight: 500; }
.sub { font-size: .85rem; color: var(--text-secondary); margin-top: 4px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.detail-tags .tag {
  font-size: .76rem; padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--brand-100); color: var(--brand-700);
  border: 1px solid var(--brand-200);
}
.detail-tags .tag.shared {
  background: var(--accent-100); color: var(--accent-700);
  border-color: var(--accent-300);
  font-weight: 700;
}
.detail-section {
  padding: 14px 16px; background: #fff; margin-top: 8px;
  border-bottom: 1px solid var(--border-color);
}
.detail-section h4 {
  font-size: .82rem; color: var(--text-warm); margin-bottom: 10px;
  letter-spacing: .04em;
}
.detail-section p { font-size: .88rem; line-height: 1.7; color: var(--text-primary); }
.detail-grid {
  display: grid; grid-template-columns: 90px 1fr;
  row-gap: 8px; column-gap: 10px;
  font-size: .85rem;
}
.detail-grid .k { color: var(--text-secondary); }
.detail-grid .v { color: var(--text-primary); }

.detail-actions {
  position: sticky; bottom: var(--bottom-nav-height); z-index: 40;
  background: #fff; padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex; gap: 10px; align-items: center;
}
.btn-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gray-100); color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.btn-like {
  flex: 1; background: var(--brand-500); color: #fff;
  padding: 13px 0; border-radius: var(--radius-full);
  font-weight: 700;
  border: 1px solid var(--brand-600);
  box-shadow: 0 6px 20px rgba(254,105,112,.34);
}
.btn-like:hover { background: var(--brand-600); }
.btn-like.disabled {
  background: var(--gray-300); box-shadow: none; border-color: var(--gray-300);
}

/* ========== Likes / Conversations / Footprints lists ========== */
.seg-tabs {
  display: flex; background: #fff;
  border-bottom: 1px solid var(--border-color);
}
.seg-tab {
  flex: 1; padding: 12px 0; font-size: .88rem;
  color: var(--text-secondary); position: relative;
}
.seg-tab.active { color: var(--brand-500); font-weight: 700; }
.seg-tab.active::after {
  content: ''; position: absolute; left: 25%; right: 25%; bottom: 0;
  height: 2px; background: var(--brand-500);
}
.seg-count {
  display: inline-block; min-width: 18px; padding: 0 6px; line-height: 18px;
  background: var(--brand-500); color: #fff;
  font-size: .68rem; border-radius: var(--radius-full);
  margin-left: 4px;
}

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.list-row:hover { background: var(--gray-50); }
.lr-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lr-body { flex: 1; min-width: 0; }
.lr-name { font-weight: 700; font-size: .92rem; }
.lr-meta { font-size: .76rem; color: var(--text-secondary); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-aside { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.lr-unread {
  display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; line-height: 20px;
  background: var(--brand-500); color: #fff;
  font-size: .7rem; border-radius: var(--radius-full); text-align: center;
  margin-top: 4px;
}

/* ========== Chat ========== */
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 50;
}
.back {
  background: none; padding: 4px 10px; font-size: 1.4rem; color: var(--brand-500);
}
.ch-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.ch-info { flex: 1; min-width: 0; }
.ch-name { font-weight: 700; font-size: .95rem; color: var(--text-warm); }
.ch-meta { font-size: .72rem; color: var(--text-secondary); }

.chat-body {
  padding: 16px 12px; min-height: calc(100vh - var(--header-height) - 60px - var(--bottom-nav-height));
  background: var(--bg-app);
}
.chat-msg { display: flex; margin-bottom: 8px; }
.chat-msg.me { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px; border-radius: 18px;
  font-size: .9rem; line-height: 1.6;
  word-wrap: break-word; word-break: break-word;
}
.chat-msg.them .chat-bubble { background: #fff; color: var(--text-primary); }
.chat-msg.me   .chat-bubble {
  background: var(--brand-500); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.them .chat-bubble { border-bottom-left-radius: 4px; }
.chat-time { font-size: .68rem; color: var(--text-muted); margin: 0 8px; align-self: flex-end; }

.chat-footer {
  position: sticky; bottom: var(--bottom-nav-height); z-index: 40;
  background: #fff; padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  display: flex; gap: 8px;
}
.chat-input {
  flex: 1; padding: 10px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border-color); background: var(--gray-50);
  font-size: .9rem;
}
.chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-500); color: #fff;
  font-size: 1.1rem; flex-shrink: 0;
  box-shadow: var(--shadow-brand);
}

/* ========== MyPage / Profile edit ========== */
.mypage-hero {
  text-align: center; padding: 28px 16px 18px; background: #fff;
  border-bottom: 1px solid var(--border-color);
}
.mypage-avatar {
  width: 90px; height: 90px; margin: 0 auto;
  border-radius: 50%; background: #fff;
  border: 2px solid var(--brand-200);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.mypage-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mypage-name { font-size: 1.15rem; font-weight: 700; margin-top: 10px; color: var(--text-warm); }
.mypage-meta { font-size: .82rem; color: var(--text-secondary); margin-top: 2px; }

.mypage-list { background: #fff; margin-top: 8px; }
.mypage-section-title {
  font-size: .76rem; color: var(--text-muted); padding: 18px 16px 8px;
  letter-spacing: .04em;
}
.mypage-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer; font-size: .92rem;
}
.row-icon { width: 28px; flex-shrink: 0; font-size: 1.05rem; text-align: center; color: var(--text-secondary); }
.mypage-row.danger .row-icon { color: var(--accent-600); }
.row-arrow { margin-left: auto; color: var(--text-muted); }
.mypage-row.danger { color: var(--accent-600); }

.form-card {
  background: #fff; padding: 16px;
}
.form-section { padding: 18px 0; border-bottom: 1px solid var(--border-light); }
.form-section:last-of-type { border-bottom: none; }
.form-section-title {
  font-size: .9rem; font-weight: 700; color: var(--text-warm);
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.form-group { margin-bottom: 14px; }
.form-label { font-size: .8rem; color: var(--text-secondary); margin-bottom: 6px; display: block; }
.form-input {
  width: 100%; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 10px 12px;
  font-size: .92rem; background: #fff;
}
.form-textarea { width: 100%; min-height: 90px; resize: vertical;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 10px 12px; font-size: .92rem; background: #fff;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-selects { display: flex; gap: 6px; align-items: center; }
.inline-suffix { color: var(--text-secondary); font-size: .82rem; }
.form-hint { font-size: .72rem; color: var(--text-muted); margin-top: 4px; line-height: 1.6; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--border-color); background: #fff;
  font-size: .82rem; cursor: pointer;
  transition: all .15s;
}
.chip.selected {
  background: var(--brand-500); color: #fff; border-color: var(--brand-500);
}
.chip.accent.selected {
  background: var(--accent-500); border-color: var(--accent-500);
}

.chip-grouped { display: flex; flex-direction: column; gap: 14px; }
.chip-group { display: flex; flex-direction: column; gap: 6px; }
.chip-group-heading {
  font-size: .72rem; color: var(--text-muted); font-weight: 500;
  letter-spacing: .04em;
  border-left: 2px solid var(--accent-500);
  padding-left: 8px; line-height: 1.2;
}


/* ========== Certificates ========== */
.cert-intro {
  background: var(--brand-50);
  padding: 14px 18px;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-bottom: 1px solid var(--border-color);
}
.cert-intro b { color: var(--brand-700); font-weight: 700; }
.cert-spec { font-size: .72rem; color: var(--text-muted); margin-top: 6px; }

.cert-list { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cert-card {
  background: #fff; border-radius: var(--radius-md);
  padding: 16px 18px; box-shadow: var(--shadow-xs);
}
.cert-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.cert-icon { font-size: 1.4rem; }
.cert-title { font-weight: 700; flex: 1; font-size: .95rem; color: var(--text-warm); }
.cert-status {
  font-size: .72rem; padding: 2px 8px; border-radius: var(--radius-full);
  font-weight: 700;
}
.cert-status.none     { background: var(--gray-100); color: var(--text-muted); }
.cert-status.pending  { background: #fff4e0; color: #b87600; }
.cert-status.approved { background: #d8f6e1; color: #1e8849; }
.cert-status.rejected { background: var(--accent-100); color: var(--accent-700); }
.cert-desc { font-size: .8rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.6; }
.cert-actions { display: flex; gap: 8px; align-items: center; }
.cert-upload-btn, .cert-replace-btn {
  background: var(--brand-500); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 700;
  display: inline-block; cursor: pointer;
}
.cert-replace-btn { background: var(--gray-100); color: var(--text-secondary); }
.cert-view-btn {
  background: #fff; color: var(--brand-500); border: 1px solid var(--brand-500);
  padding: 8px 16px; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 600; cursor: pointer;
}
.cert-delete-btn {
  background: none; color: var(--brand-700);
  font-size: .76rem; margin-left: auto; cursor: pointer;
  text-decoration: underline;
}
.cert-note {
  font-size: .72rem; color: var(--text-muted);
  margin-top: 6px;
}
.cert-reviewer-note {
  background: var(--accent-100); color: var(--accent-700);
  padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: .76rem; margin-top: 8px;
}

/* ========== Bottom nav ========== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  z-index: 100;
  padding-bottom: var(--safe-bottom);
  max-width: 430px; margin: 0 auto;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px 0; font-size: .7rem;
  color: var(--text-muted); position: relative;
}
.nav-item .nav-icon { font-size: 1.25rem; line-height: 1; margin-bottom: 4px; display: inline-flex; align-items: center; justify-content: center; height: 1.4em; }
.nav-item.active { color: var(--brand-500); }
.nav-item.active .nav-icon { color: var(--brand-500); }
.nav-badge {
  position: absolute; top: 4px; right: 26%;
  background: var(--brand-500); color: #fff;
  font-size: .6rem; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 9999px; line-height: 16px;
}

/* ========== Match / generic modal ========== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(31,41,55,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-card {
  background: #fff; border-radius: var(--radius-xl);
  padding: 28px 24px; width: 100%; max-width: 360px;
  text-align: center; box-shadow: var(--shadow-lg);
}
.modal-card h2 { font-size: 1.15rem; color: var(--text-warm); margin-bottom: 6px; }
.modal-card .pair {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 18px 0;
}
.pair-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-200);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pair-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pair-heart { color: var(--brand-500); font-size: 1.6rem; }
.modal-buttons { display: flex; gap: 10px; margin-top: 18px; }

/* ========== Misc ========== */
.toast {
  position: fixed; bottom: calc(var(--bottom-nav-height) + 16px); left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fff;
  padding: 10px 18px; border-radius: var(--radius-full);
  font-size: .82rem;
  z-index: 250;
  opacity: 0; pointer-events: none; transition: opacity .2s;
  white-space: nowrap;
}
.toast.show { opacity: 1; }
.spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 3px solid var(--brand-100); border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 恋シェルジュ仲介機能 ========== */
/* マイページ代行カード */
.concierge-card {
  background: linear-gradient(135deg, #fff 0%, #fff8f5 100%);
  margin: 16px 12px 20px;
  border-radius: 14px;
  border: 1px solid #ffd9d4;
  padding: 16px 16px 12px;
  box-shadow: 0 2px 8px rgba(254, 105, 112, .08);
}
.concierge-card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.concierge-card-head .icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.concierge-card-head .title {
  font-size: .98rem; font-weight: 700; color: var(--brand-700);
}
.concierge-card-head .badge {
  margin-left: auto;
  font-size: .68rem; font-weight: 700;
  background: #fff; color: var(--brand-500);
  border: 1px solid var(--brand-300);
  padding: 3px 8px; border-radius: 999px;
}
.concierge-card .desc {
  font-size: .78rem; line-height: 1.65; color: #555; margin: 8px 0 12px;
}
.concierge-mode-list { display: flex; flex-direction: column; gap: 6px; }
.concierge-mode-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid #f0e0e0; border-radius: 10px;
  background: #fff; cursor: pointer; transition: all .15s ease;
}
.concierge-mode-opt.selected {
  border-color: var(--brand-500); background: #fff5f5;
}
.concierge-mode-opt .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #d0c0c0; flex-shrink: 0; margin-top: 2px;
  position: relative; background: #fff;
}
.concierge-mode-opt.selected .radio { border-color: var(--brand-500); }
.concierge-mode-opt.selected .radio::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--brand-500);
}
.concierge-mode-opt .label-block { flex: 1; }
.concierge-mode-opt .label-main {
  font-size: .86rem; font-weight: 600; color: var(--text-warm);
}
.concierge-mode-opt .label-sub {
  font-size: .72rem; color: #888; margin-top: 2px; line-height: 1.5;
  display: block;
}
.concierge-card .footnote {
  font-size: .7rem; color: #999;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed #f0d8d8;
}
.concierge-card .footnote a { color: var(--brand-500); text-decoration: underline; }

/* 女性側チャット仲介中バナー */
.concierge-banner {
  background: linear-gradient(135deg, #fff8f5 0%, #ffe8e3 100%);
  padding: 8px 14px;
  border-bottom: 1px solid #ffd9d4;
  display: flex; align-items: center; gap: 10px;
  font-size: .76rem;
  color: var(--brand-700);
  position: sticky; top: 60px; z-index: 49;
}
.concierge-banner .icon { font-size: 1rem; }
.concierge-banner .text { flex: 1; line-height: 1.45; }
.concierge-banner .text b { font-weight: 700; }
.concierge-banner .info-btn {
  background: #fff; color: var(--brand-500);
  border: 1px solid var(--brand-300);
  font-size: .7rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  flex-shrink: 0;
}

/* 代理送信メッセージのバッジ (吹き出し内) */
.chat-concierge-badge {
  display: inline-block;
  font-size: .62rem; font-weight: 700;
  background: rgba(255,255,255,.85); color: var(--brand-500);
  padding: 1px 6px; border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.chat-msg.them .chat-concierge-badge {
  background: var(--brand-50); color: var(--brand-700);
}

/* セッティング提案バナー (チャット上部) */
.proposal-banner {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  border-top: 1px solid #ffd9d4;
  border-bottom: 1px solid #ffd9d4;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: background .15s;
}
.proposal-banner:hover { background: #ffeeec; }
.proposal-banner .icon { font-size: 1.4rem; }
.proposal-banner .text { flex: 1; }
.proposal-banner .text .title {
  font-size: .85rem; font-weight: 700; color: var(--brand-700);
}
.proposal-banner .text .sub {
  font-size: .72rem; color: #888; margin-top: 2px;
}
.proposal-banner .arrow {
  font-size: 1.3rem; color: var(--brand-500);
}

/* ブリーフィング画面 (対面セッティング同意) */
#screen-briefing { background: var(--bg-app); }
.briefing-shell { padding: 0 0 24px; }
.briefing-hero {
  background: linear-gradient(135deg, var(--brand-500) 0%, #ff8b91 100%);
  color: #fff;
  padding: 22px 20px 26px;
  text-align: center;
}
.briefing-hero .badge {
  display: inline-block;
  background: rgba(255,255,255,.25);
  padding: 4px 12px; border-radius: 999px;
  font-size: .7rem; font-weight: 700; margin-bottom: 8px;
  letter-spacing: .05em;
}
.briefing-hero h2 {
  font-size: 1.15rem; font-weight: 700; margin: 0 0 6px;
}
.briefing-hero .sub { font-size: .8rem; opacity: .92; }
.briefing-section {
  background: #fff; padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
}
.briefing-section h4 {
  font-size: .8rem; font-weight: 700; color: var(--brand-700);
  margin: 0 0 10px; padding-left: 10px;
  border-left: 3px solid var(--brand-500);
}
.briefing-partner-row {
  display: flex; gap: 12px; align-items: center;
}
.briefing-partner-row .ava {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0; overflow: hidden;
}
.briefing-partner-row .ava .avatar-img {
  width: 100%; height: 100%; object-fit: cover;
}
.briefing-partner-row .pname { font-weight: 700; font-size: .95rem; color: var(--text-warm); }
.briefing-partner-row .pmeta { font-size: .76rem; color: #888; margin-top: 2px; }
.briefing-summary {
  background: #fff8f5; border-radius: 8px;
  padding: 12px 14px; font-size: .82rem; line-height: 1.7;
  color: #555;
}
.briefing-list { list-style: none; padding: 0; margin: 0; }
.briefing-list li {
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
  font-size: .82rem; color: var(--text-primary);
  display: flex; gap: 10px;
}
.briefing-list li:last-child { border: none; }
.briefing-list li .tag-pill {
  flex-shrink: 0; font-size: .68rem; font-weight: 700;
  background: var(--brand-50); color: var(--brand-700);
  padding: 2px 8px; border-radius: 999px;
  height: fit-content;
}
.briefing-list li .tag-pill.warn {
  background: #fff5e6; color: #c87a00;
}
.briefing-actions { padding: 16px 18px 24px; background: #fff; }
.briefing-confirm {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; background: #fff8f5;
  border-radius: 8px;
  font-size: .78rem; line-height: 1.6; color: #555;
  margin-bottom: 14px;
}
.briefing-confirm input[type=checkbox] {
  margin-top: 2px; flex-shrink: 0;
}
.briefing-actions .btn-row { display: flex; gap: 10px; }
.briefing-actions .btn-decline {
  flex: 1; padding: 12px;
  background: #fff; color: #888;
  border: 1px solid #ddd; border-radius: 999px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
}
.briefing-actions .btn-accept {
  flex: 2; padding: 12px;
  background: var(--brand-500); color: #fff;
  border: none; border-radius: 999px;
  font-size: .92rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-brand);
}
.briefing-actions .btn-accept:disabled {
  background: #ccc; box-shadow: none; cursor: not-allowed;
}

/* ===== 詳しい価値観・経験 (非公開) ===== */
.private-section {
  background: #f8fafc;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  padding: 16px 14px;
  margin: 16px 0;
}
.private-section .form-section-title {
  color: #45607a;
}
.prv-sensitive-block {
  margin-top: 18px;
  padding: 14px;
  background: #fff;
  border: 1px dashed #c87a00;
  border-radius: 10px;
}
.prv-sensitive-head {
  font-size: .82rem; font-weight: 700;
  color: #c87a00;
  margin-bottom: 6px;
}
.prv-sensitive-desc {
  font-size: .72rem; color: #666; line-height: 1.7;
  margin-bottom: 10px;
}
.prv-consent {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .82rem; color: var(--text-primary);
  cursor: pointer;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: #fff8e1;
  border-radius: 6px;
}
.prv-consent input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0;
  accent-color: #c87a00;
}
.prv-mental-wrap { transition: opacity .2s; }

/* ========== Correction over Creation (AI仮埋め修正UI) ========== */
.correction-banner {
  background: linear-gradient(135deg, #fff8ec 0%, #fff3da 100%);
  border: 1px solid #f0d9a0;
  margin: 14px 12px 8px;
  padding: 14px 16px;
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
}
.correction-banner .icon { font-size: 1.8rem; flex-shrink: 0; }
.correction-banner .body { flex: 1; }
.correction-banner .title {
  font-size: .92rem; color: #6f5418; line-height: 1.5;
}
.correction-banner .title b { color: #c87a00; }
.correction-banner .sub {
  font-size: .76rem; color: #886836; margin-top: 4px; line-height: 1.5;
}
/* AI仮埋め項目のハイライト (input/select/textarea) */
.form-input[data-ai="1"], select.form-input[data-ai="1"], textarea.form-input[data-ai="1"] {
  background: linear-gradient(135deg, #fffaf0 0%, #fff5e0 100%);
  border-color: #f0d9a0;
  position: relative;
}
.form-input[data-ai="1"]:focus {
  background: #fff;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(254, 105, 112, .12);
}
/* フォームラベル横に🤖マークを表示 (CSSのみで実現は難しいので、JSでクラス制御するなら .form-group:has() を使う) */
.form-group:has(.form-input[data-ai="1"]) > .form-label::after {
  content: ' 🤖';
  font-size: .82rem;
  opacity: .7;
}
/* 詳細画面: 共通点ヒーロー (上部に強調表示) */
.detail-shared-hero {
  background: linear-gradient(135deg, #fff8f5 0%, #ffe8e3 100%);
  border: 1px solid #ffd9d4;
  border-radius: 14px;
  margin: 12px;
  padding: 14px 16px;
}
.detail-shared-hero .shared-headline {
  font-size: .95rem; font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.detail-shared-hero .shared-headline b {
  font-size: 1.3rem; color: var(--brand-500);
  margin: 0 4px;
}
.detail-shared-hero .shared-icon { font-size: 1.1rem; }

/* ===== 絶対に外したい条件 (Deal-breakers) ===== */
.deal-breaker-section {
  background: #fffaf3;
  border: 1px solid #f0e0c8;
  border-radius: 12px;
  padding: 16px 14px;
  margin: 16px 0;
}
.deal-breaker-section .form-section-title {
  color: #8a5a18;
}
.db-item {
  margin: 16px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #f0d9a0;
}
.db-item:last-of-type {
  border-bottom: none;
}
.db-label {
  font-size: .92rem; font-weight: 700;
  color: var(--text-warm);
  margin-bottom: 4px;
}
.db-why {
  font-size: .72rem; color: #886836;
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #f0d9a0;
  line-height: 1.55;
  margin-bottom: 10px;
}
.db-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: .88rem; color: var(--text-primary);
  cursor: pointer;
  padding: 8px 0;
}
.db-toggle input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--brand-500);
}
.db-not-included {
  margin-top: 18px;
  background: #fff;
  border: 1px dashed #ddd;
  border-radius: 10px;
  padding: 12px 14px;
}
.db-not-title {
  font-size: .82rem; font-weight: 700;
  color: #777;
  margin-bottom: 8px;
}
.db-not-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.db-not-tag {
  background: #f5f5f5; color: #999;
  font-size: .76rem;
  padding: 3px 10px; border-radius: 999px;
  text-decoration: line-through;
}
.db-not-why {
  font-size: .72rem; color: #888; line-height: 1.7;
}

/* ===== プロフィール (マイページのリンク) ===== */
.mypage-row-profile {
  align-items: flex-start;
}
.mypage-row-profile .row-body { flex: 1; min-width: 0; }
.mypage-row-profile .row-title-line {
  display: flex; align-items: center; gap: 8px;
}
.mypage-row-profile .row-sub {
  font-size: .72rem; color: #888; margin-top: 2px; line-height: 1.4;
  margin-bottom: 8px;
}

/* マイページの細い完成度バー (プロフィール行内) */
.completion-bar {
  width: 100%; height: 5px;
  background: #f0e0e0; border-radius: 999px;
  overflow: hidden;
}
.completion-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-500), #ff8b91);
  transition: width .4s ease;
}

/* 完成度バッジ (マイページのリンク横の小さい数値) */
.completion-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  background: #f0f0f0; color: #888;
  letter-spacing: 0;
  min-width: 36px; text-align: center;
}
.completion-badge.empty   { background: #fee; color: #c0392b; }
.completion-badge.partial { background: #fff5e0; color: #c87a00; }
.completion-badge.full    { background: #d4edda; color: #155724; }
.completion-badge.optional {
  background: #f5f5f5; color: #888; font-weight: 600;
}

/* ===== プロフィール編集 画面上部の完成度バー ===== */
.profile-progress {
  margin: 12px 14px 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8f5 0%, #ffeae5 100%);
  border: 1px solid #ffd9d4;
  border-radius: 12px;
}
.profile-progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
}
.profile-progress-label {
  font-size: .82rem; font-weight: 700; color: var(--brand-700);
  letter-spacing: .04em;
}
.profile-progress-percent {
  font-size: .82rem; color: #8a4248;
}
.profile-progress-percent b {
  font-size: 1.4rem; color: var(--brand-500); margin: 0 2px;
}
.profile-progress-bar {
  width: 100%; height: 8px;
  background: rgba(255, 255, 255, .6);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.profile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-500), #ff8b91);
  border-radius: 999px;
  transition: width .5s ease;
}
.profile-progress-hint {
  font-size: .72rem; color: #886; line-height: 1.6;
}

/* タップで開くタイプの concierge-card (相談カード) */
.concierge-card-clickable {
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.concierge-card-clickable:hover {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  box-shadow: 0 4px 12px rgba(254, 105, 112, .14);
}
.concierge-card-clickable::after {
  content: '›';
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; color: var(--brand-500);
}
.concierge-card-clickable { position: relative; padding-right: 32px; }

/* 「無料」バッジ (恋シェルジュ代行カードと統一) */
.badge-free {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  background: #fff; color: var(--brand-500);
  border: 1px solid var(--brand-300);
  padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0;
}

/* ===== 恋シェルジュ相談モーダル ===== */
.cr-modal {
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}
.cr-examples {
  background: #fff8f5;
  border: 1px solid #ffd9d4;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0 14px;
}
.cr-examples-title {
  font-size: .76rem; font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 6px;
  letter-spacing: .04em;
}
.cr-examples-list {
  margin: 0; padding-left: 18px;
  font-size: .8rem; line-height: 1.75;
  color: #666;
}
.cr-examples-list li { margin-bottom: 1px; }
.cr-section-label {
  font-size: .76rem; font-weight: 700;
  color: var(--brand-700);
  margin: 18px 0 8px;
  letter-spacing: .04em;
}
.cr-quick-picks {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cr-quick-picks .chip {
  font-size: .82rem;
  padding: 6px 12px;
}
.cr-textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  resize: vertical;
  background: #fafafa;
}
.cr-textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
}
.cr-feedback { min-height: 24px; }
.cr-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .85rem;
  margin-top: 12px;
  text-align: center;
}
.cr-error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #c62828;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .82rem;
  margin-top: 12px;
}

/* ご相談履歴 */
.cr-history-title {
  font-size: .82rem; font-weight: 700;
  color: var(--brand-700);
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed #f0d9a0;
}
.cr-history-empty {
  text-align: center; font-size: .82rem; color: #888;
  padding: 14px 0;
}
.cr-history-item {
  background: #fafafa;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.cr-h-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.cr-h-status {
  font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.cr-h-open        { background: var(--brand-l); color: var(--brand-d); }
.cr-h-in_progress { background: #fff3cd; color: #856404; }
.cr-h-resolved    { background: #d4edda; color: #155724; }
.cr-h-date { font-size: .7rem; color: #999; }
.cr-h-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.cr-h-body {
  font-size: .82rem; color: var(--text-primary);
  line-height: 1.55; margin-top: 4px;
}
.cr-h-response {
  background: #fff5f5; border-left: 3px solid var(--brand-500);
  padding: 8px 10px; border-radius: 4px;
  font-size: .8rem; color: #555; margin-top: 6px;
}

/* 恋シェルジュへの相談リンク (検索画面下) */
.concierge-request-link {
  margin: 28px 14px 24px;
  text-align: center;
}
.concierge-request-link a {
  display: inline-block;
  background: #fff;
  border: 1.5px dashed var(--brand-300);
  color: var(--brand-700);
  padding: 14px 22px;
  border-radius: 12px;
  font-size: .82rem;
  line-height: 1.6;
  text-decoration: none;
  transition: all .15s;
}
.concierge-request-link a:hover {
  background: #fff5f5;
  border-color: var(--brand-500);
}
.concierge-request-link a b {
  font-size: .92rem;
  color: var(--brand-500);
}

/* 「今日のおすすめ」モード サマリー */
.search-result-summary.today {
  background: linear-gradient(135deg, #fff8f5 0%, #ffe8e3 100%);
  border: 1px solid #ffd9d4;
  border-radius: 12px;
  padding: 16px 18px 14px;
  color: var(--brand-700);
  text-align: center;
  line-height: 1.55;
}
.search-result-summary.today .today-date {
  font-size: .82rem; color: #8a5a5d; margin-bottom: 4px;
  letter-spacing: .04em;
}
.search-result-summary.today .today-count {
  font-size: .92rem; margin-bottom: 8px;
}
.search-result-summary.today .today-count b {
  font-size: 1.5rem; color: var(--brand-500); margin: 0 4px;
}
.search-result-summary.today .today-why {
  font-size: .76rem; color: #886; line-height: 1.7;
  border-top: 1px dashed #f0d9a0;
  padding-top: 10px; margin-top: 4px;
}

/* ホーム画面のセクション補足文 */
.home-section-sub {
  font-size: .76rem; color: #888; line-height: 1.55;
  margin: -4px 0 10px 2px;
}
/* 「今日のお相手はここまで」フッター — partner-grid (2列) の全幅を使う */
.today-footer {
  grid-column: 1 / -1;          /* 2カード分横に広げる */
  margin: 16px 0 0;
  padding: 26px 22px;
  text-align: center;
  background: linear-gradient(135deg, #fdf6f0 0%, #fff 100%);
  border: 1px dashed #f0d9a0;
  border-radius: 14px;
}
.today-footer-icon { font-size: 1.8rem; margin-bottom: 10px; }
.today-footer-text { font-size: .92rem; line-height: 1.7; color: var(--text-warm); }
.today-footer-text b { color: var(--brand-500); }
.today-footer-hint {
  font-size: .76rem; color: #888; margin-top: 8px;
}

/* 検索一覧カードの共通点バッジ */
.partner-card { position: relative; }
.partner-shared-badge {
  position: absolute; top: 8px; right: 8px;
  background: linear-gradient(135deg, var(--brand-500) 0%, #ff8b91 100%);
  color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(254, 105, 112, .3);
  z-index: 2;
  letter-spacing: 0;
}
.partner-shared-badge b {
  font-size: .82rem; margin: 0 1px;
}

/* chip系セクション見出しの「🤖 仮設定」マーク */
.ai-section-mark {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  background: #fff5e0; color: #c87a00;
  border: 1px solid #f0d9a0;
  padding: 2px 8px; border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0;
}
