/* ==========================================================================
   地域若者向け まちの営みマッチング掲示板 - スマホ特化モバイルファーストスタイル
   Designed specifically for mobile users (Instagram / note / Mobile App style)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;700;800&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&display=swap');

:root {
  /* Brand Theme Colors */
  --primary: #059669;             /* 落ち着いたエメラルドグリーン */
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --accent-amber: #d97706;        /* お礼バッジ用 */
  --accent-amber-light: #fef3c7;
  
  --line-green: #06c755;          /* LINE公式グリーン */
  --line-green-hover: #05b04c;
  
  --bg-app: #f8fafc;              /* 全体背景 */
  --bg-surface: #ffffff;          /* カード・モーダル背景 */
  --bg-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --border-subtle: #e2e8f0;
  
  --radius-card: 20px;
  --radius-sm: 10px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-floating: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  
  --font-main: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: #f1f5f9; /* PCではアプリ風に見える背景 */
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* スマホ特化：画面中央にスマートフォンのプロポーションで収めるコンテナ */
.mobile-app-shell {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-app);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: calc(75px + var(--safe-bottom)); /* 下部ナビゲーションの高さ分 */
}

/* ==========================================================================
   スリム＆アプリ風 ヘッダー
   ========================================================================== */

.app-top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.brand-text {
  font-size: 1.02rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-text span {
  color: var(--primary);
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

/* ==========================================================================
   ストーリー / ピックアップ風 ヒーローヘッダー
   ========================================================================== */

.mobile-hero {
  padding: 1.25rem 1rem 0.85rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-light);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-main-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero-sub-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* ==========================================================================
   横スクロール カテゴリピル ＆ 検索バー
   ========================================================================== */

.mobile-search-section {
  padding: 0 1rem;
  margin-bottom: 0.85rem;
}

.mobile-search-input-wrap {
  position: relative;
  width: 100%;
}

.mobile-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  font-size: 0.86rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: #ffffff;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.mobile-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.mobile-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.95rem;
}

/* スワイプ可能なピルバー */
.mobile-category-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 1rem 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  white-space: nowrap;
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  background: white;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.cat-pill.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

/* ==========================================================================
   スマホ最適化：縦スクロール 営みカード
   ========================================================================== */

.mobile-feed {
  padding: 0.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feed-card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
  cursor: pointer;
}

.feed-card:active {
  transform: scale(0.985);
}

.card-visual {
  position: relative;
  aspect-ratio: 16/10;
  width: 100%;
  background: #e2e8f0;
  overflow: hidden;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-badge-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

.floating-badge-capacity {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card-details {
  padding: 1rem 1.15rem 1.15rem;
}

.card-org-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
}

.card-lead-title {
  font-size: 1.08rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.card-info-chips {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #475569;
}

.chip-icon {
  font-size: 0.88rem;
  width: 16px;
  text-align: center;
}

.card-reward-box {
  background: var(--accent-amber-light);
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-reward-box span.arrow {
  color: #b45309;
  font-weight: 900;
  font-size: 0.95rem;
}

/* ==========================================================================
   スマホ特化：ボトムシート（Bottom Sheet）モーダル
   ========================================================================== */

.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-end; /* 画面下部に配置 */
  justify-content: center;
}

.bottom-sheet-overlay.active {
  display: flex;
}

.bottom-sheet-card {
  background: white;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  position: relative;
  animation: slideUpMobile 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(20px + var(--safe-bottom));
}

@keyframes slideUpMobile {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* スワイプバー */
.bottom-sheet-drag-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #cbd5e1;
  margin: 10px auto 6px;
}

.sheet-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 1rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.sheet-content {
  padding: 0.85rem 1.25rem 1.5rem;
}

.sheet-sticky-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem calc(0.75rem + var(--safe-bottom));
  margin: 1.5rem -1.25rem -1.5rem;
}

.btn-entry-big {
  width: 100%;
  padding: 0.95rem;
  font-size: 1.05rem;
  font-weight: 900;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transition: all 0.2s;
}

.btn-entry-big:active {
  transform: scale(0.98);
}

/* ==========================================================================
   スマホ用 固定ボトムナビゲーションバー
   ========================================================================== */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  padding: 0.45rem 0 calc(0.45rem + var(--safe-bottom));
  z-index: 90;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 12px;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* ==========================================================================
   フォーム・入力パーツ
   ========================================================================== */

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.form-label .badge-req {
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 0.35rem;
}

.form-label .badge-opt {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 0.35rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-line {
  background: var(--line-green);
  color: white;
}

.btn-outline {
  background: white;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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