:root {
  /* テーマカラー #F38241 を軸にした暖色パレット */
  --accent: #f38241;
  --accent-deep: #e35d1d;
  --accent-ink: #c14e15;
  --accent-50: #fef5ef;
  --accent-100: #fde5d4;
  --accent-200: #fac9a6;
  --grad: linear-gradient(135deg, #f6975c 0%, #f38241 45%, #e85f1e 100%);

  --line-green: #06c755;

  /* 暖色寄りのニュートラル */
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #231a12;
  --text-sub: #75695d;
  --text-faint: #a89c8e;
  --border: #ece5dc;
  --track: #f1ebe3;

  --green-bg: #e9f9ef; --green-fg: #0e9f56;
  --amber-bg: #fef6e0; --amber-fg: #d68a06;
  --gray-bg: #f2eee9;  --gray-fg: #8d8275;

  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(35, 26, 18, 0.05), 0 2px 6px rgba(35, 26, 18, 0.04);
  --shadow-md: 0 2px 6px rgba(35, 26, 18, 0.05), 0 10px 28px rgba(35, 26, 18, 0.09);
  --shadow-accent: 0 6px 18px rgba(243, 130, 65, 0.38);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

svg.lucide {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* ============ ログイン ============ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}

.blob-a {
  width: 480px; height: 480px;
  background: #fcd4b4;
  top: -160px; right: -120px;
}

.blob-b {
  width: 420px; height: 420px;
  background: #fde8d2;
  bottom: -180px; left: -140px;
}

.login-screen {
  transition: opacity 0.38s ease;
}

.login-screen.fade-out { opacity: 0; pointer-events: none; }

.splash {
  position: relative;
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 24px;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-accent);
}

.logo-mark { display: block; }

.login-logo .logo-mark { width: 58%; height: 58%; }

.brand-icon .logo-mark { width: 62%; height: 62%; }

.login-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 10px;
}

.splash-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3.5px solid var(--accent-100);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.splash-text { font-size: 13.5px; font-weight: 700; color: var(--text); }

.login-note { margin-top: 16px; font-size: 11px; color: var(--text-faint); line-height: 1.8; }

/* ============ ヘッダー ============ */
.header {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 3px 10px rgba(243, 130, 65, 0.3);
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-weight: 900;
  font-size: 15.5px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.brand-name small {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 14px 4px 5px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ---- ピル型タブ ---- */
.tabs-track {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2px 24px 12px;
}

.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--track);
  border-radius: 14px;
  padding: 4px;
  max-width: 100%;
  overflow-x: auto;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-sub);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.tab svg.lucide { font-size: 15px; }

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--accent-ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* ============ レイアウト ============ */
.container { max-width: 1120px; margin: 0 auto; padding: 26px 24px 90px; }

/* ---- ヒーロー ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  border-radius: 24px;
  padding: 30px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
  box-shadow: var(--shadow-accent);
  margin-bottom: 26px;
  animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.deco-a { width: 300px; height: 300px; top: -170px; right: -60px; }
.deco-b { width: 180px; height: 180px; bottom: -110px; right: 220px; background: rgba(255, 255, 255, 0.08); }

.hero-text { position: relative; }

.hero-stats { display: flex; gap: 0; }

.stat {
  display: flex;
  flex-direction: column;
  padding: 0 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  line-height: 1.3;
}

.stat:first-child { padding-left: 0; border-left: none; }

.stat strong { font-size: 24px; font-weight: 900; }

.stat span { font-size: 11px; font-weight: 500; opacity: 0.92; }

.btn-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--accent-deep);
  border: none;
  border-radius: 14px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }

/* ---- ページ見出し ---- */
.page-head { margin-bottom: 18px; }

.section-title { font-size: 19px; font-weight: 900; letter-spacing: 0.02em; }

.section-sub { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }

/* ---- ツールバー ---- */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; }

.filters select {
  padding: 9px 34px 9px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a89c8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}

.filters select:hover { border-color: var(--accent-200); }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 14px;
  color: var(--text-faint);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box svg.lucide { font-size: 15px; }

.search-box input {
  border: none;
  outline: none;
  padding: 9px 0;
  font-size: 12.5px;
  font-family: inherit;
  background: transparent;
  width: 170px;
  color: var(--text);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 130, 65, 0.15);
}

.summary-bar { font-size: 12px; color: var(--text-faint); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.empty-note { color: var(--text-faint); font-size: 13.5px; padding: 24px 4px; }

/* ============ カード共通 ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.job-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-200);
}

.job-card.is-closed { opacity: 0.55; }

.job-card.is-closed:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }

.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.open { background: var(--green-bg); color: var(--green-fg); }
.badge.open::before { animation: pulse 1.8s ease infinite; }
.badge.closing { background: var(--amber-bg); color: var(--amber-fg); }
.badge.closed { background: var(--gray-bg); color: var(--gray-fg); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-50);
  color: var(--accent-ink);
  border: 1px solid var(--accent-100);
  padding: 2px 11px;
  border-radius: 999px;
}

.tag.neutral {
  background: var(--gray-bg);
  color: var(--text-sub);
  border-color: transparent;
  font-weight: 500;
}

.job-title { font-size: 15.5px; font-weight: 700; line-height: 1.55; }

.job-excerpt {
  font-size: 12.5px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-reward {
  display: flex;
  align-items: baseline;
  gap: 7px;
  background: var(--accent-50);
  border-radius: 12px;
  padding: 9px 14px;
}

.job-reward .label { font-size: 10.5px; font-weight: 700; color: var(--accent-ink); }

.job-reward .value { font-size: 15px; font-weight: 900; color: var(--accent-deep); letter-spacing: 0.01em; }

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--text-sub);
}

.job-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }

.job-meta svg.lucide { font-size: 14px; color: var(--text-faint); }

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-sub);
}

.job-poster { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }

.job-poster .avatar { width: 24px; height: 24px; font-size: 11px; }

.job-deadline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--text-faint);
  font-weight: 500;
}

.job-deadline svg.lucide { font-size: 13px; }

.deadline-warn { color: var(--amber-fg); font-weight: 900; }

/* ============ アバター ============ */
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}

.avatar-sm { width: 26px; height: 26px; font-size: 12px; }

.avatar[data-color="0"] { background: linear-gradient(135deg, #f6975c, #e85f1e); }
.avatar[data-color="1"] { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.avatar[data-color="2"] { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.avatar[data-color="3"] { background: linear-gradient(135deg, #34d399, #059669); }
.avatar[data-color="4"] { background: linear-gradient(135deg, #fb7185, #e11d48); }
.avatar[data-color="5"] { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.avatar[data-color="6"] { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.avatar[data-color="7"] { background: linear-gradient(135deg, #e879f9, #c026d3); }

/* ============ 作業者カード ============ */
.worker-card { display: flex; flex-direction: column; gap: 13px; }

.worker-head { display: flex; align-items: center; gap: 13px; }

.worker-name { font-weight: 900; font-size: 15px; line-height: 1.4; }

.worker-course { font-size: 11.5px; font-weight: 500; color: var(--text-sub); }

.avail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  margin-left: auto;
  white-space: nowrap;
}

.avail::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.avail.available { background: var(--green-bg); color: var(--green-fg); }
.avail.available::before { animation: pulse 1.8s ease infinite; }
.avail.limited { background: var(--amber-bg); color: var(--amber-fg); }
.avail.busy { background: var(--gray-bg); color: var(--gray-fg); }

.worker-skills { display: flex; flex-wrap: wrap; gap: 6px; }

.worker-bio { font-size: 12.5px; color: var(--text-sub); }

.worker-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg);
  border-radius: 12px;
  padding: 9px 14px;
}

.worker-stats .meta-item { display: inline-flex; align-items: center; gap: 6px; }

.worker-stats svg.lucide { font-size: 14px; color: var(--text-faint); }

.worker-stats .star { color: var(--text); }

.worker-stats .star svg.lucide { fill: #f5a623; color: #f5a623; }

.btn-scout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(243, 130, 65, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn-scout:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: var(--shadow-accent); }

.btn-scout:disabled {
  background: var(--gray-bg);
  color: var(--text-faint);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ============ イベント ============ */
.event-list { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }

.event-card {
  display: flex;
  gap: 22px;
  align-items: center;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-200); }

.event-date {
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 16px;
  padding: 12px 0;
  text-align: center;
  flex-shrink: 0;
  width: 78px;
}

.event-date .month { font-size: 11px; font-weight: 900; color: var(--accent); }
.event-date .day { font-size: 27px; font-weight: 900; color: var(--accent-deep); line-height: 1.1; }

.event-info { flex: 1; min-width: 0; }

.event-title { font-weight: 700; font-size: 15px; margin-bottom: 3px; }

.women-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 900;
  color: #c026d3;
  background: #fdf4ff;
  border: 1px solid #f5d0fe;
  border-radius: 999px;
  padding: 1px 9px;
  margin-left: 8px;
  vertical-align: 1px;
}

.women-badge svg.lucide { font-size: 11px; }

.event-subtitle {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-ink);
  margin-bottom: 6px;
}

.event-detail {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-sub);
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.event-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }

.event-meta svg.lucide { font-size: 13px; color: var(--text-faint); }

.btn-join {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: var(--accent-deep);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-join:hover { background: var(--accent-50); }

.btn-join.joined { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(243, 130, 65, 0.3); }

/* ============ ボタン ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(243, 130, 65, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: var(--shadow-accent); }

.btn-primary:disabled {
  background: var(--gray-bg);
  color: var(--text-faint);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover { background: var(--gray-bg); }

/* ============ モーダル ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 26, 18, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border-radius: 22px;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-header h3 { font-size: 15.5px; font-weight: 900; }

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg);
  border: none;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  color: var(--text-faint);
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover { background: var(--gray-bg); color: var(--text); }

.modal-body { padding: 24px 26px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
}

/* ============ フォーム ============ */
.form-row { margin-bottom: 18px; }

.form-row label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 7px; }

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 130, 65, 0.15);
}

.form-row.half { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.req {
  background: #fdebe3;
  color: #d6491b;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  margin-left: 5px;
  vertical-align: 1px;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 400 !important;
  font-size: 13px !important;
  cursor: pointer;
  color: var(--text-sub);
}

.checkbox-row input { width: auto !important; accent-color: var(--accent); }

.profile-edit { max-width: 560px; }

/* ============ 詳細モーダル内 ============ */
.detail-section { margin-bottom: 16px; }

.detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.detail-label svg.lucide { font-size: 13px; }

.detail-value { font-size: 14px; }

.poster-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 17px;
}

/* ============ メッセージ ============ */
.tab-badge {
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 4px;
}

.thread-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }

.thread-item {
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  padding: 16px 18px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.thread-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-200); }

.thread-main { flex: 1; min-width: 0; }

.thread-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.thread-name { font-weight: 900; font-size: 14px; }

.thread-time { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

.thread-context {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-preview {
  font-size: 12.5px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-unread {
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
}

/* ---- チャット画面 ---- */
.chat {
  max-width: 720px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}

.chat-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}

.chat-back:hover { background: var(--gray-bg); color: var(--text); }

.chat-title { min-width: 0; }

.chat-name { font-weight: 900; font-size: 14px; line-height: 1.4; }

.chat-name small { font-weight: 500; font-size: 11px; color: var(--text-sub); }

.chat-context {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  height: 46vh;
  min-height: 280px;
  overflow-y: auto;
  background: var(--bg);
}

.bubble-row { display: flex; align-items: flex-end; gap: 8px; }

.bubble-row.me { justify-content: flex-end; }

.bubble {
  max-width: 74%;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  border-radius: 16px;
  word-break: break-word;
}

.bubble.them {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.bubble.me {
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(243, 130, 65, 0.25);
}

.bubble-time {
  display: block;
  font-size: 10px;
  opacity: 0.65;
  margin-top: 4px;
  text-align: right;
}

.chat-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
  padding: 9px 18px 0;
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 12px 18px 16px;
}

.chat-input input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 130, 65, 0.15);
}

.chat-input .btn-primary { padding: 11px 16px; }

/* ============ マッチング・チップ類 ============ */
.rec-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-ink);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

.rec-note svg.lucide { font-size: 14px; }

.match-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 3px 10px rgba(243, 130, 65, 0.4);
}

.match-banner svg.lucide { font-size: 13px; }

.match-banner.detail { display: flex; margin-bottom: 14px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.exp-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 11px;
  border-radius: 999px;
}

.exp-chip.beginner { background: #e6f6ff; color: #0277bd; border: 1px solid #b3e2fc; }
.exp-chip.experienced { background: #f3eaff; color: #7c3aed; border: 1px solid #e0ccff; }

.meta-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--gray-bg);
  border-radius: 999px;
  padding: 2px 11px;
}

.reward-note { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

/* ---- チェックチップ群（フォーム） ---- */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }

.chip-check { position: relative; cursor: pointer; }

.chip-check input { position: absolute; opacity: 0; pointer-events: none; }

.chip-check span {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  transition: all 0.15s;
}

.chip-check input:checked + span {
  background: var(--accent-50);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
}

.chip-check:hover span { border-color: var(--accent-200); }

.field-hint { font-size: 11.5px; color: var(--text-faint); margin: -2px 0 8px; }

/* ---- トグルスイッチ（通知設定など） ---- */
/* .form-row label { display:block } より詳細度を上げて flex を効かせる */
.switch-row,
.form-row label.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 0;
  font-size: 13.5px;
  font-weight: 500;
}
.switch-row input { display: none; }
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--track);
  border: 1px solid var(--border);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease;
}
.switch-row input:checked + .switch {
  background: var(--accent);
  border-color: var(--accent-deep);
}
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-label { color: var(--text); }

/* ---- セグメント（求める経験） ---- */
.segmented { display: inline-flex; background: var(--track); border-radius: 12px; padding: 4px; gap: 2px; }

.seg {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
}

.seg input { position: absolute; opacity: 0; pointer-events: none; }

.seg.checked { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

/* ---- ラベル内ボタン（AI整形） ---- */
.label-row { display: flex !important; align-items: center; justify-content: space-between; }

.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  color: var(--accent-ink);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  transition: background 0.15s;
}

.ai-btn:hover { background: var(--accent-100); }

.ai-btn svg.lucide { font-size: 13px; }

/* ---- 作業者カードの属性・バッジ・フラグ ---- */
.worker-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--text-sub);
  background: var(--bg);
  border-radius: 12px;
  padding: 9px 14px;
}

.worker-attrs .meta-item { display: inline-flex; align-items: center; gap: 5px; }

.worker-attrs svg.lucide { font-size: 14px; color: var(--text-faint); }

.wc-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 900;
  color: var(--accent-ink);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: 1px;
}

.wc-badge svg.lucide { font-size: 12px; }

.worker-flag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: #fff4ed;
  border: 1px solid #ffd9bf;
  border-radius: 10px;
  padding: 8px 12px;
}

.worker-flag svg.lucide { font-size: 14px; }

.wc-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--accent-ink);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.wc-row svg.lucide { font-size: 15px; }

.future-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--gray-bg);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ============ トースト ============ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c2018;
  color: #fff;
  padding: 13px 26px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100vw - 40px);
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ============ レスポンシブ ============ */
@media (max-width: 640px) {
  .hero { padding: 24px; }
  .btn-hero { width: 100%; justify-content: center; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .card-grid { grid-template-columns: 1fr; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .event-card { flex-wrap: wrap; }
  .btn-join { width: 100%; justify-content: center; }
  .brand-name { font-size: 14px; }
  .chat-body { height: 52vh; }
  .bubble { max-width: 85%; }
}
