/* =========================================================
   みんなの統計
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", YuGothic,
               "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Arial,
               "メイリオ", Meiryo, sans-serif;
  color: #2b3040;
  background: #f3f5f8;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { text-decoration: none; color: inherit; }
button, select, input { font-family: inherit; }
.is_hidden { display: none !important; }

/* ---------------- ヒーロー ---------------- */

.hero {
  background: linear-gradient(135deg, #17203c 0%, #2f5d8c 55%, #17a2a2 100%);
  color: #fff;
  text-align: center;
  padding: 32px 16px 28px;
}

.hero_badge {
  display: inline-block;
  padding: 2px 14px;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 30px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.hero_title {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.hero_title_em {
  font-size: 2.1rem;
  color: #7ef0e0;
}

.hero_copy {
  font-size: 0.82rem;
  line-height: 1.95;
  margin-top: 10px;
  color: rgba(255,255,255,0.92);
}

.hero_stat {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 16px;
  background: rgba(0,0,0,0.22);
  border-radius: 30px;
  font-size: 0.75rem;
}

/* ---------------- 本体 ---------------- */

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 12px 8px;
}

.loading { text-align: center; color: #98a0b0; font-size: 0.85rem; padding: 24px 0; }

/* ---------------- プライバシー ---------------- */

/* フッターの中に置いている。
   本文の邪魔をせず、探したときには必ず見つかる位置。 */
.privacy {
  max-width: 560px;
  margin: 16px auto 0;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid #17a2a2;
  border-radius: 10px;
  text-align: left;
}

.privacy_title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #7ef0e0;
  margin-bottom: 4px;
}

.privacy_list li {
  position: relative;
  padding-left: 15px;
  font-size: 0.74rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.78);
}

.privacy_list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #17a2a2;
}

.privacy_list b { color: #ffffff; }

/* ---------------- プロフィール ---------------- */

/* 回答時に聞くので、普段は今の設定を控えめに出しておくだけ */
.profile_line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: #868e9d;
  margin-bottom: 6px;
}

.profile_line .link_btn { margin-top: 0; font-size: 0.74rem; }

.prof_item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #5a6172;
}

.prof_item select, .fil_sel, .ans_select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #cdd4e0;
  border-radius: 8px;
  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23788'/%3E%3C/svg%3E") no-repeat right 9px center;
  padding: 7px 26px 7px 10px;
  font-size: 0.82rem;
  color: #2b3040;
  cursor: pointer;
}

/* ---------------- 回答時のポップアップ ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23,32,60,0.55);
}

body.is_locked { overflow: hidden; }

.modal_box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 40px rgba(23,32,60,0.3);
}

.modal_title { font-size: 1rem; font-weight: 700; }

.modal_note {
  font-size: 0.76rem;
  color: #78808f;
  line-height: 1.7;
  margin-top: 4px;
}

.modal_selects {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.modal_selects .prof_item { justify-content: space-between; }
.modal_selects select { flex: 1; margin-left: 10px; }

.modal_err {
  margin-top: 10px;
  font-size: 0.76rem;
  color: #c0492b;
  font-weight: 700;
}

.modal_actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.modal_actions .btn { flex: 1; padding: 10px 8px; }

.btn_ghost {
  background: #eef1f7;
  color: #5a6172;
}

/* ---------------- ジャンル ---------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.filter_btn {
  padding: 6px 13px;
  border: 1px solid #cfd6e2;
  border-radius: 30px;
  background: #fff;
  color: #5a6172;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter_btn.is_on {
  background: #17203c;
  border-color: #17203c;
  color: #fff;
  font-weight: 700;
}

/* ---------------- 共有リンクからの絞り込み ---------------- */

.focus_banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #e8f6f6;
  border: 1px solid #a9dede;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.8rem;
  color: #14607a;
  margin-bottom: 12px;
}

.focus_clear {
  border: 1px solid #17a2a2;
  background: #fff;
  color: #14607a;
  border-radius: 30px;
  padding: 4px 14px;
  font-size: 0.76rem;
  cursor: pointer;
}

.hit_count {
  font-size: 0.74rem;
  color: #98a0b0;
  margin-bottom: 8px;
}

/* ---------------- カード ---------------- */

.cards { display: grid; gap: 14px; }

.card {
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(23,32,60,0.05);
}

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

.card_cat {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 30px;
  background: #eef1f7;
  color: #5a6172;
  font-size: 0.68rem;
}

.card_n { font-size: 0.7rem; color: #98a0b0; }

.card_title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.55;
  margin-top: 6px;
}

.card_note {
  font-size: 0.74rem;
  color: #868e9d;
  line-height: 1.7;
  margin-top: 2px;
}

/* ---------------- 回答 ---------------- */

.ans_row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.num_box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ans_num {
  width: 110px;
  border: 1px solid #cdd4e0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.95rem;
  text-align: right;
  color: #2b3040;
}

.ans_num::-webkit-outer-spin-button,
.ans_num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ans_num { -moz-appearance: textfield; }

.num_unit { font-size: 0.8rem; color: #5a6172; }

.ans_select { max-width: 100%; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 30px;
  padding: 9px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn_answer {
  background: #17a2a2;
  color: #fff;
  transition: background 0.15s;
}

.btn_answer:hover { background: #148d8d; }

.link_btn {
  margin-top: 8px;
  border: none;
  background: none;
  padding: 0;
  color: #2f6bff;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
}

.err {
  margin-top: 6px;
  font-size: 0.76rem;
  color: #c0492b;
}

.mine_row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 12px;
  background: #edf9f3;
  border-radius: 8px;
}

.mine_label { font-size: 0.75rem; color: #47705c; }
.mine_val { font-size: 1.05rem; font-weight: 700; color: #0f9d58; }
.mine_row .link_btn { margin-top: 0; margin-left: auto; }

/* ---------------- 結果 ---------------- */

.result { margin-top: 12px; }

.card_filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.fil_label {
  font-size: 0.74rem;
  color: #868e9d;
  font-weight: 700;
}

/* グラフの開閉 */
.toggle_btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #f7f9fc;
  color: #5a6172;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.toggle_btn:hover { background: #eef2f8; }

.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.no_data {
  text-align: center;
  font-size: 0.82rem;
  color: #98a0b0;
  padding: 18px 0;
}

.stat_row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.stat {
  flex: 1;
  text-align: center;
  background: #f5f7fb;
  border-radius: 8px;
  padding: 6px 4px;
}

.stat_key {
  display: block;
  font-size: 0.68rem;
  color: #868e9d;
  line-height: 1.4;
}

.stat_val {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-all;
}

.stat_val.is_mean { color: #ff5c7a; }
.stat_val.is_median { color: #2f6bff; }

.dev {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f0f4ff;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  color: #2b3040;
}

.dev b { font-size: 1.3rem; color: #2f4bd8; }

.dev_note { font-size: 0.7rem; color: #868e9d; }

.dev.is_wait {
  background: #f5f7fb;
  color: #868e9d;
  font-size: 0.76rem;
}

.btn_share {
  display: block;
  margin-top: 10px;
  background: #0f1419;
  color: #fff;
}

/* ---------------- リクエスト ---------------- */

.request {
  margin-top: 22px;
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}

.request h2 { font-size: 0.95rem; font-weight: 700; }

.request p { font-size: 0.78rem; color: #78808f; line-height: 1.8; margin-top: 4px; }

.btn_request {
  margin-top: 10px;
  background: #17203c;
  color: #fff;
}

.request_tag {
  margin-top: 6px;
  font-size: 0.74rem;
  color: #17a2a2;
  font-weight: 700;
}

/* ---------------- 広告・フッター ---------------- */

.ads_wrap { margin: 22px 0 8px; min-height: 1px; }

.back_to_menu { text-align: center; padding: 14px 12px 4px; }

.back_to_menu a {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid #cfd6e2;
  border-radius: 30px;
  background: #fff;
  color: #5a6172;
  font-size: 0.82rem;
}

.foot {
  margin-top: 18px;
  padding: 20px 16px 26px;
  background: #17203c;
  color: rgba(255,255,255,0.75);
  text-align: center;
}

.foot_title { font-size: 0.9rem; font-weight: 700; color: #fff; }

.foot_detail, .foot_note {
  font-size: 0.72rem;
  line-height: 1.8;
  margin-top: 6px;
}

.foot_note { color: rgba(255,255,255,0.55); }

/* ---------------- PC ---------------- */

@media screen and (min-width: 700px) {
  .hero { padding: 42px 16px 34px; }
  .hero_title { font-size: 2rem; }
  .hero_title_em { font-size: 2.5rem; }
  .hero_copy { font-size: 0.92rem; }
  .card { padding: 20px 22px; }
  .card_title { font-size: 1.12rem; }
  .stat_val { font-size: 1.05rem; }
}
