/* =========================================================
   好き？嫌い？少数派ゲーム
   ========================================================= */

*, *::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: #2e2e2e;
  background: #f4f5f7;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, p { margin: 0; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

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

.hero {
  background: linear-gradient(135deg, #ff6b8a 0%, #6b7cff 100%);
  color: #fff;
  text-align: center;
  padding: 30px 16px 26px;
}

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

.hero_title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 10px;
}

.hero_title_em { font-size: 1.9rem; }

.hero_copy {
  font-size: 0.8rem;
  line-height: 1.9;
  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.18);
  border-radius: 30px;
  font-size: 0.75rem;
}

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

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

/* ---------------- 遊び方の切り替え ---------------- */

.modes {
  display: flex;
  gap: 6px;
  max-width: 420px;
  margin: 0 auto 14px;
  padding: 5px;
  background: #e7e9ef;
  border-radius: 40px;
}

.mode_btn {
  flex: 1;
  padding: 9px 4px;
  border: none;
  border-radius: 40px;
  background: transparent;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode_btn.is_on {
  background: #fff;
  color: #2b3245;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.howto {
  text-align: center;
  font-size: 0.82rem;
  color: #666;
  line-height: 1.8;
  margin-bottom: 16px;
}

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

/* ---------------- カテゴリ絞り込み ---------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.filter {
  padding: 6px 16px;
  border: 1px solid #d5d8e0;
  border-radius: 30px;
  background: #fff;
  color: #666;
  font-size: 0.8rem;
  cursor: pointer;
}

.filter.is_on { background: #2b3245; border-color: #2b3245; color: #fff; font-weight: 700; }

/* ---------------- 検索・並び替え ---------------- */

.tools {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.search_box {
  position: relative;
  flex: 1 1 180px;
}

.search_box input {
  width: 100%;
  padding: 9px 34px 9px 14px;
  border: 1px solid #d5d8e0;
  border-radius: 30px;
  background: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  color: #2e2e2e;
  -webkit-appearance: none;
  appearance: none;
}

.search_box input:focus { outline: 2px solid #6b7cff; outline-offset: -1px; }

/* type="search" はブラウザが独自の×を出すので消す。
   自前のボタンと二重に表示されてしまうため。 */
.search_box input::-webkit-search-cancel-button,
.search_box input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search_clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #e7e9ef;
  color: #666;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: none;   /* 入力があるときだけ出す */
}

.search_box.has_text .search_clear { display: block; }

.sort_box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.sort_label { font-size: 0.75rem; color: #888; white-space: nowrap; }

.sort_box select {
  padding: 8px 10px;
  border: 1px solid #d5d8e0;
  border-radius: 30px;
  background: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  color: #2e2e2e;
  cursor: pointer;
}

.hit_count {
  font-size: 0.72rem;
  color: #999;
  text-align: right;
  margin-bottom: 12px;
}

/* シェアされたリンクから来たときの案内 */
.focus_banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff6d8;
  border: 1px solid #f0dfa0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #7a6420;
  margin-bottom: 10px;
}

.focus_banner.is_hidden { display: none; }

.focus_clear {
  border: none;
  background: #2b3245;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

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

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card_head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card_emoji { font-size: 1.5rem; line-height: 1; }
.card_label { font-size: 1.05rem; font-weight: 700; }

/* 投票ボタン */

.choose { display: flex; gap: 10px; }

.vote {
  flex: 1;
  padding: 11px 0;
  border-radius: 40px;
  border: 2px solid;
  background: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s;
}

.vote:active { transform: translateY(2px); }
.vote:disabled { opacity: 0.5; cursor: default; }
.vote_like { border-color: #ff6b8a; color: #e8395f; }
.vote_dislike { border-color: #6b7cff; color: #4553d6; }

/* みんなで予想モードの「割合を表示」 */
.vote_reveal {
  border-color: #2b3245;
  background: #2b3245;
  color: #fff;
}

/* 結果 */

.bar {
  display: flex;
  height: 22px;
  border-radius: 30px;
  overflow: hidden;
  background: #eee;
}

.bar_like { background: #ff6b8a; }
.bar_dislike { background: #6b7cff; }

.legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-top: 6px;
}

.legend_like { color: #e8395f; }
.legend_dislike { color: #4553d6; }
.legend_like.is_mine, .legend_dislike.is_mine { font-weight: 700; }
.legend_like.is_mine::after, .legend_dislike.is_mine::after { content: "（あなた）"; font-size: 0.72rem; }

.verdict {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 10px;
}

.verdict.is_minority { color: #e8395f; }
.verdict.is_majority { color: #5a6172; }

.meta { text-align: center; font-size: 0.72rem; color: #999; }
.result_none { font-size: 0.8rem; color: #999; text-align: center; }

/* シェア */

.share {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.share_btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.share_x { background: #111; }
.share_line { background: #00b900; }
.share_fb { background: #3b5998; }

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

.request {
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px;
  margin-top: 22px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.request h2 { font-size: 1.05rem; font-weight: 700; }
.request p { font-size: 0.8rem; color: #666; line-height: 1.8; margin-top: 8px; }

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 40px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 14px;
}

.btn_request { background: #111; color: #fff; }

.request_tag {
  font-size: 0.78rem;
  color: #888;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.ads_wrap { margin: 22px 0; text-align: center; }

/* ---------------- 導線・フッター ---------------- */

.back_to_menu { text-align: center; margin: 8px 0 28px; }

.back_to_menu a {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid #ccc;
  border-radius: 30px;
  color: #555;
  font-size: 0.85rem;
  background: #fff;
}

.foot {
  background: #2b3245;
  color: #fff;
  text-align: center;
  padding: 22px 16px 26px;
}

.foot_title { font-size: 0.95rem; font-weight: 700; }
.foot_detail { font-size: 0.72rem; color: #aab2c6; line-height: 1.8; margin-top: 6px; }

.foot_note {
  font-size: 0.68rem;
  color: #8a92a8;
  line-height: 1.8;
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.foot_note a { color: #c3c9dc; text-decoration: underline; }

/* =========================================================
   PC / タブレット
   ========================================================= */

@media screen and (min-width: 640px) {
  .hero { padding: 46px 16px 38px; }
  .hero_title { font-size: 2.1rem; }
  .hero_title_em { font-size: 2.5rem; }
  .hero_copy { font-size: 0.95rem; }
  .hero_stat { font-size: 0.85rem; }

  .sp_br { display: none; }
  .howto { font-size: 0.9rem; }

  .wrap { padding: 30px 20px 8px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .card { padding: 18px 20px 16px; }
  .card_label { font-size: 1.1rem; }
}

@media screen and (min-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
}
