/* Chiyoda Next Voice — base styles
   デザインのトーン: 青グラデ + オレンジCTA + 雲モチーフ + 角丸大きめのカード
*/

:root {
  --c-primary:        #1d4ed8;     /* blue-700 */
  --c-primary-dark:   #1e3a8a;     /* blue-900 */
  --c-primary-light:  #3b82f6;     /* blue-500 */
  --c-accent:         #f59e0b;     /* amber-500 */
  --c-accent-dark:    #d97706;     /* amber-600 */
  --c-accent-soft:    #fbbf24;     /* amber-400 */
  --c-bg:             #f5f8ff;
  --c-bg-hero:        linear-gradient(180deg, #eef4ff 0%, #ffffff 80%);
  --c-text:           #1f2937;
  --c-text-soft:      #6b7280;
  --c-card:           #ffffff;
  --c-border:         #e5e7eb;
  --c-success:        #10b981;
  --c-warning:        #f59e0b;
  --shadow-sm:        0 2px 4px rgba(15, 23, 42, .04);
  --shadow-md:        0 6px 18px rgba(15, 23, 42, .08);
  --shadow-lg:        0 18px 40px rgba(15, 23, 42, .12);
  --radius-sm:        10px;
  --radius-md:        18px;
  --radius-lg:        28px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, 'Noto Sans JP',
               'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: 'palt';
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==== Header ==== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--c-primary-dark);
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  display: grid; place-items: center; color: #fff; font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.brand-text { line-height: 1.1; }
.brand-text small {
  display: block; font-size: 10px; color: var(--c-text-soft);
  letter-spacing: .12em; font-weight: 600;
}
/* === 横並びナビ (PC) — 「セグメント連結」で1つのボタンに見える ===
   各項目は内部で完全フラット（角丸なし・隙間なし）で接続し、
   左右両端のみコンテナの border-radius でカーブする */
.nav-row {
  display: inline-flex;
  align-items: stretch;                  /* 全項目同じ高さ */
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;                      /* 子の四角角を丸枠でクリップ */
  padding: 0; gap: 0;
}
.nav-row__item,
.nav-row__login {
  display: inline-flex; align-items: center;
  padding: 10px 18px;                    /* 統一の高さと打感 */
  font-size: 14px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  border-right: 1px solid var(--c-border);  /* セグメント間の細い縦線 */
  border-radius: 0;                      /* 完全フラット（端は親clipで丸） */
  background: transparent;
  color: var(--c-text);
  transition: background .15s, color .15s;
}
.nav-row > a:last-child { border-right: 0; }

.nav-row__item:hover {
  background: #f1f5f9; color: var(--c-primary-dark); text-decoration: none;
}
.nav-row__item.is-active {
  background: var(--c-primary); color: #fff;
}

/* ログイン / ログアウト — バーの右端セグメント。色だけ変えて区別 */
.nav-row__login {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  color: #fff !important; font-weight: 700;
  border-right: 0;
}
.nav-row__login:hover { filter: brightness(1.06); text-decoration: none; }

/* モバイル切替 */
.nav-toggle { display: none; }
.nav-mobile { display: none; }

@media (max-width: 880px) {
  .nav-row { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid var(--c-border);
    border-radius: 10px; background: #fff; color: #333; cursor: pointer;
  }
  .nav-toggle svg { stroke: #333; }
  /* モバイルメニューは白背景・黒文字でシンプルに */
  .nav-mobile {
    display: none; padding: 8px; border-top: 1px solid var(--c-border); background: #fff;
  }
  .nav-mobile.is-open { display: block; }
  .nav-mobile a {
    display: block; padding: 11px 14px; color: #222;
    border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px;
  }
  .nav-mobile a + a { border-top: 1px solid #f1f5f9; }
  .nav-mobile a.is-active { background: #f1f5f9; color: #222; }
  /* ログイン/ログアウトも白背景・黒文字に統一 */
  .nav-mobile__login {
    background: #fff !important;
    color: #222 !important;
    margin-top: 0;
  }
}

@media (max-width: 980px) and (min-width: 881px) {
  .nav-row__item { padding: 8px 11px; font-size: 13px; }
  .nav-row__login { padding: 8px 14px; font-size: 12px; }
}

/* ==== Hero ==== */
/* 千代田区の街並みイラストをヒーロー背景に（デザイン反映 #62） */
.hero {
  position: relative; overflow: hidden;
  background: #eef4ff url('../img/hero_chiyoda.jpg') center top / cover no-repeat;
  padding: 60px 0 92px;
}
/* 中央の文字を読みやすくする霞 + 下端を地色になじませる（旧・雲ブロブは廃止） */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 62% at 50% 44%, rgba(255,255,255,.50), rgba(255,255,255,0) 72%),
    linear-gradient(180deg, rgba(245,248,255,0) 58%, var(--c-bg) 100%);
}
.hero::after { content: none; }
/* スマホは縦構図の専用イラストに差し替え（街並みを大きく見せる） */
@media (max-width: 640px) {
  .hero {
    background-image: url('../img/hero_chiyoda_mobile.jpg');
    background-position: center; background-size: cover;
    padding: 40px 0 92px;
  }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 40%),
      linear-gradient(180deg, rgba(245,248,255,0) 82%, var(--c-bg) 100%);
  }
  .hero-sub   { text-shadow: 0 1px 2px rgba(255,255,255,.95), 0 0 8px rgba(255,255,255,.8); }
  .hero-title { text-shadow: 0 1px 10px rgba(255,255,255,.6); }
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); color: var(--c-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
}
.hero-title {
  margin: 18px 0 10px; font-size: clamp(28px, 5vw, 48px);
  font-weight: 900; letter-spacing: .02em; line-height: 1.2;
  color: var(--c-primary-dark);
}
.hero-title .accent {
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin: 12px auto 28px; max-width: 600px;
  color: var(--c-text-soft); font-size: 15px;
}
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ==== Buttons ==== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: transform .1s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { box-shadow: var(--shadow-lg); }
.btn--secondary {
  color: var(--c-primary); background: #fff; border-color: var(--c-border);
}
.btn--blue {
  color: #fff;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  box-shadow: var(--shadow-md);
}
/* 応援済みトグル状態 (グレー) */
.btn--supported {
  color: #4b5563;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  cursor: pointer;
}
.btn--supported:hover {
  background: #d1d5db;
  color: #1f2937;
}
.btn--ghost {
  color: var(--c-text); background: transparent; border-color: var(--c-border);
}
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ==== Stats ==== */
.stats {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: -36px; position: relative; z-index: 2;
}
.stat-card {
  background: #fff; border-radius: var(--radius-md); padding: 18px 20px;
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 14px;
}
.stat-card__label { color: var(--c-text-soft); font-size: 12px; }
.stat-card__value { font-size: 24px; font-weight: 800; color: var(--c-primary-dark); }
.stat-card__icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(29, 78, 216, .08); color: var(--c-primary);
  display: grid; place-items: center; font-size: 20px;
}
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* ==== Sections ==== */
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 8px;
}
.section-head h2 {
  margin: 0; font-size: 24px; font-weight: 900; color: var(--c-primary-dark);
}
.section-head h2 small {
  display: block; font-size: 11px; color: var(--c-text-soft);
  letter-spacing: .18em; margin-top: 4px;
}
.section-head a { font-weight: 600; font-size: 14px; }

/* ==== Cards ==== */
.cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards, .cards--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--c-card); border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm);
  border: 1px solid #f1f5f9;
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 12px;
}
.card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--c-primary-light);
  text-decoration: none;
}
.card__title { font-weight: 800; font-size: 16px; color: var(--c-text); }
.card__excerpt { color: var(--c-text-soft); font-size: 13px; }
.card__meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid #f1f5f9;
  font-size: 12px; color: var(--c-text-soft);
}

/* ==== Badges ==== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: #eef2ff; color: var(--c-primary-dark);
}
.badge--reviewing   { background: #fef3c7; color: #92400e; }
.badge--open        { background: #dbeafe; color: #1e40af; }
.badge--considering { background: #ede9fe; color: #5b21b6; }
.badge--responded   { background: #d1fae5; color: #065f46; }
.badge--closed      { background: #e5e7eb; color: #374151; }
.badge--draft       { background: #f3f4f6; color: #6b7280; }

/* ==== Progress ==== */
.progress {
  width: 100%; height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  border-radius: 999px;
}
.progress--accent .progress__bar {
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
}
.progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--c-text-soft); margin-bottom: 6px;
}
.progress-meta strong { color: var(--c-primary-dark); font-size: 16px; }

/* ==== Roadmap ==== */
.roadmap {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  border-radius: var(--radius-lg); padding: 44px 28px; color: #fff;
  text-align: center; position: relative; overflow: hidden;
}
.roadmap::before {
  content: ''; position: absolute; right: 24px; top: 24px; font-size: 48px;
  opacity: .2;
}
.roadmap h2 {
  margin: 0; font-size: 28px; font-weight: 900;
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, serif;
}
.roadmap h2 small {
  display: block; font-size: 11px; letter-spacing: .24em; margin-top: 6px;
  opacity: .8; font-weight: 400;
}
.roadmap-steps {
  margin-top: 32px; display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}
.step {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-md); padding: 18px;
}
.step__num {
  font-family: 'Hiragino Mincho ProN', serif;
  font-size: 32px; font-weight: 900; opacity: .6;
}
.step__title { font-weight: 800; margin-top: 4px; }
.step__desc  { font-size: 12px; opacity: .8; margin-top: 6px; }
@media (max-width: 768px) { .roadmap-steps { grid-template-columns: 1fr 1fr; } }

/* ==== Filter Bar ==== */
.filter-bar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: #fff; padding: 14px 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.filter-bar select, .filter-bar input {
  appearance: none; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--c-border); background: #fff;
  font-size: 13px; font-family: inherit;
}
.filter-bar label {
  font-size: 12px; color: var(--c-text-soft); font-weight: 600; margin-right: 4px;
}

/* ==== Proposal Detail ==== */
.detail-hero {
  background: #fff; border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9;
}
.detail-hero h1 {
  font-size: 26px; font-weight: 900; margin: 6px 0 16px; color: var(--c-primary-dark);
}
.detail-section {
  background: #fff; border-radius: var(--radius-md); padding: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9; margin-top: 20px;
}
.detail-section h3 {
  margin: 0 0 12px; font-size: 16px; color: var(--c-primary-dark);
  border-left: 4px solid var(--c-accent); padding-left: 10px;
}

/* ==== Status Timeline ==== */
.timeline {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 24px;
}
.timeline__step {
  text-align: center; padding: 8px 4px; border-radius: 10px;
  background: #f1f5f9; color: var(--c-text-soft); font-size: 12px; font-weight: 600;
  position: relative;
}
.timeline__step.is-active { background: var(--c-primary); color: #fff; }
.timeline__step.is-passed { background: #dbeafe; color: var(--c-primary-dark); }
@media (max-width: 640px) { .timeline { font-size: 10px; } }

/* ==== Comments ==== */
.comment {
  padding: 14px 0; border-bottom: 1px solid #f1f5f9;
}
.comment:last-child { border-bottom: 0; }
.comment__head {
  display: flex; gap: 10px; align-items: center; margin-bottom: 6px;
  font-size: 13px;
}
.comment__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.comment__name { font-weight: 700; }
.comment__time { color: var(--c-text-soft); font-size: 11px; }
.comment__body { color: var(--c-text); font-size: 14px; white-space: pre-wrap; }

/* ==== Gov response ==== */
.gov-response {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1px solid #a7f3d0; border-radius: var(--radius-md); padding: 24px;
  margin-top: 20px;
}
.gov-response__category {
  display: inline-flex; padding: 4px 14px; border-radius: 999px;
  background: var(--c-success); color: #fff; font-weight: 700; font-size: 12px;
  letter-spacing: .04em;
}
.gov-response__body { white-space: pre-wrap; margin-top: 12px; line-height: 1.8; }

/* ==== Footer ==== */
.site-footer {
  margin-top: 72px; background: #fff; border-top: 1px solid var(--c-border);
}
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: 40px 20px;   /* 左右に余白（以前は 0 で文字が端にくっついていた）*/
}
.footer-inner h4 {
  margin: 0 0 14px; font-size: 12px; color: var(--c-accent-dark); letter-spacing: .12em;
}
.footer-inner ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.footer-inner ul li { margin-bottom: 8px; }
.footer-inner ul a { color: var(--c-text); }
.footer-copy {
  text-align: center; padding: 18px; font-size: 11px; color: var(--c-text-soft);
  border-top: 1px solid var(--c-border);
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }

/* ==== Misc ==== */
.muted { color: var(--c-text-soft); }
.empty { padding: 40px; text-align: center; color: var(--c-text-soft); }
.flash {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
  background: #ecfeff; color: #155e75; border: 1px solid #a5f3fc;
}
.flash--error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* ==== テーマ一覧をコンパクトに（スマホで2列・カードを小さめ） ==== */
.cards--theme .card { padding: 14px; gap: 8px; }
.cards--theme .card__title { font-size: 15px; }
.cards--theme .card__excerpt { font-size: 12px; }
@media (max-width: 640px) {
  .cards--theme { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .cards--theme .card { padding: 12px; }
  .cards--theme .card__title { font-size: 14px; }
  .cards--theme .card__excerpt { display: none; }   /* 一覧では説明を省いて短く */
  .cards--theme .card__meta { font-size: 10px; }
}

/* ==== 未ログイン向け「初めての方はこちら」常時バナー ==== */
.intro-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff; box-shadow: 0 -4px 20px rgba(15,23,42,.18);
}
.intro-banner__inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.intro-banner__icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.intro-banner__text { flex: 1; min-width: 0; }
.intro-banner__text strong { font-size: 14px; }
.intro-banner__text span { display: block; font-size: 11px; opacity: .9; }
.intro-banner__cta {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  color: #fff !important; font-weight: 700; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.intro-banner__cta:hover { filter: brightness(1.06); text-decoration: none; }
.intro-banner__close {
  flex-shrink: 0; background: transparent; border: 0; color: #fff; cursor: pointer;
  font-size: 18px; opacity: .8; padding: 4px 6px; line-height: 1;
}
.intro-banner__close:hover { opacity: 1; }
.intro-banner.is-hidden { display: none; }
/* 未ログイン向けバナーに登場するキャラクター（バーの上端に立つ） */
.intro-banner__chars {
  position: absolute; left: 20px; bottom: 100%;
  height: 104px; width: auto; pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(15,23,42,.22));
}
/* バナー分の余白をbodyに足してフッターが隠れないように */
body.has-intro-banner { padding-bottom: 76px; }
@media (max-width: 640px) {
  .intro-banner__text span { display: none; }
  .intro-banner__inner { padding: 9px 12px; gap: 8px; }
  body.has-intro-banner { padding-bottom: 64px; }
  .intro-banner__chars { left: 8px; height: 60px; }
}

/* ==== チュートリアル動画モーダル ==== */
.video-modal {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(15,23,42,.78); padding: 20px;
  align-items: center; justify-content: center;
}
.video-modal.is-open { display: flex; }
.video-modal__box {
  position: relative; width: 100%; max-width: 860px;
}
.video-modal__close {
  position: absolute; top: -40px; right: 0;
  background: transparent; border: 0; color: #fff; font-size: 30px;
  cursor: pointer; line-height: 1; padding: 4px 8px;
}
@media (max-width: 640px) {
  .video-modal__close { top: -36px; font-size: 26px; }
}

/* バナー内「使い方動画」ボタン */
.intro-banner__video {
  flex-shrink: 0; background: rgba(255,255,255,.18); color: #fff;
  border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.intro-banner__video:hover { background: rgba(255,255,255,.3); }
@media (max-width: 640px) {
  .intro-banner__video { padding: 7px 10px; font-size: 12px; }
}
