/* ============================================================
   Gachapoll Vote — フロントCSS（好き嫌い.com風）
   - 3色パレット：引く=緑 / スキップ=グレー / 天井=赤
   - カード型 / 横棒バー / シンプル設計
   ============================================================ */

:root {
  --gp-pull:        #639922;
  --gp-pull-bg:     #EAF3DE;
  --gp-pull-text:   #173404;
  --gp-skip:        #888780;
  --gp-skip-bg:     #F1EFE8;
  --gp-skip-text:   #2C2C2A;
  --gp-pity:        #E24B4A;
  --gp-pity-bg:     #FCEBEB;
  --gp-pity-text:   #501313;

  --gp-card-bg:     #ffffff;
  --gp-card-border: rgba(0,0,0,0.08);
  --gp-text:        #1a1a1a;
  --gp-text-muted:  #6b7280;
  --gp-radius:      12px;
}

/* ===== 共通 ===== */
.gachapoll-card,
.gachapoll-list-card,
.gachapoll-detail {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "ヒラギノ角ゴ ProN W3", Meiryo, sans-serif;
  color: var(--gp-text);
}

.gachapoll-card {
  background: var(--gp-card-bg);
  border: 1px solid var(--gp-card-border);
  border-radius: var(--gp-radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.gachapoll-label {
  font-size: 14px;
  font-weight: 600;
}

.gachapoll-text-pull { color: var(--gp-pull-text); font-weight: 600; }
.gachapoll-text-skip { color: var(--gp-skip-text); font-weight: 600; }
.gachapoll-text-pity { color: var(--gp-pity-text); font-weight: 600; }

.gachapoll-fill-pull { background: var(--gp-pull); }
.gachapoll-fill-skip { background: var(--gp-skip); }
.gachapoll-fill-pity { background: var(--gp-pity); }

/* ===== 詳細ページ：ヘッダー ===== */
.gachapoll-header .gachapoll-game {
  font-size: 12px;
  color: var(--gp-text-muted);
  margin-bottom: 4px;
}
.gachapoll-header .gachapoll-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.4;
}
.gachapoll-header .gachapoll-period {
  font-size: 12px;
  color: var(--gp-text-muted);
}

/* ===== 投票ボタン ===== */
.gachapoll-question {
  font-size: 13px;
  color: var(--gp-text-muted);
  margin: 0 0 12px 0;
}
.gachapoll-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.gachapoll-btn {
  padding: 16px 8px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease;
}
.gachapoll-btn:hover    { opacity: .85; }
.gachapoll-btn:active   { transform: scale(.97); }
.gachapoll-btn:disabled { cursor: not-allowed; opacity: .5; }

.gachapoll-btn-pull { background: var(--gp-pull-bg); border-color: var(--gp-pull); color: var(--gp-pull-text); }
.gachapoll-btn-skip { background: var(--gp-skip-bg); border-color: var(--gp-skip); color: var(--gp-skip-text); }
.gachapoll-btn-pity { background: var(--gp-pity-bg); border-color: var(--gp-pity); color: var(--gp-pity-text); }

.gachapoll-btn.is-selected { box-shadow: inset 0 0 0 2px currentColor; }

/* ===== 結果バー ===== */
.gachapoll-results-head,
.gachapoll-comments-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.gachapoll-total,
.gachapoll-sort {
  font-size: 12px;
  color: var(--gp-text-muted);
}

.gachapoll-bar-row { margin-bottom: 12px; }
.gachapoll-bar-row:last-child { margin-bottom: 0; }

.gachapoll-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}
.gachapoll-bar-track {
  height: 18px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}
.gachapoll-bar-fill {
  height: 100%;
  transition: width .4s ease;
}

/* ===== コメント ===== */
.gachapoll-comment-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.gachapoll-comment-form textarea {
  flex: 1;
  resize: vertical;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--gp-card-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}
.gachapoll-comment-submit {
  padding: 0 16px;
  background: #1a1a1a;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.gachapoll-comment-list .gachapoll-comment {
  border-left: 3px solid;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 0 6px 6px 0;
}
.gachapoll-comment.choice-pull { border-color: var(--gp-pull); background: var(--gp-pull-bg); }
.gachapoll-comment.choice-skip { border-color: var(--gp-skip); background: var(--gp-skip-bg); }
.gachapoll-comment.choice-pity { border-color: var(--gp-pity); background: var(--gp-pity-bg); }

.gachapoll-comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
}
.gachapoll-comment-time {
  color: var(--gp-text-muted);
}
.gachapoll-comment-body {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.gachapoll-loading,
.gachapoll-empty {
  text-align: center;
  color: var(--gp-text-muted);
  font-size: 13px;
  padding: 16px;
}

/* ===== トップページ：ガチャ一覧カード ===== */
.gachapoll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gachapoll-list-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--gp-card-bg);
  border: 1px solid var(--gp-card-border);
  border-radius: var(--gp-radius);
  padding: 14px 16px;
  transition: border-color .15s ease;
}
.gachapoll-list-card:hover { border-color: rgba(0,0,0,0.2); }

.gachapoll-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}
.gachapoll-list-title {
  font-size: 15px;
  font-weight: 600;
}
.gachapoll-list-meta {
  font-size: 12px;
  color: var(--gp-text-muted);
  margin-top: 2px;
}
.gachapoll-list-total {
  font-size: 12px;
  color: var(--gp-text-muted);
  white-space: nowrap;
}

.gachapoll-mini-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f3f4f6;
}
.gachapoll-mini-bar > div { height: 100%; }

.gachapoll-mini-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
}

/* ===== トースト通知 ===== */
.gachapoll-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  transition: opacity .2s ease;
}
.gachapoll-toast.is-show { opacity: 1; }

/* ===== レスポンシブ ===== */
@media (max-width: 480px) {
  .gachapoll-buttons { grid-template-columns: 1fr; gap: 8px; }
  .gachapoll-header .gachapoll-title { font-size: 18px; }
  .gachapoll-card { padding: 14px 16px; }
}
