@charset "utf-8";

/* パラメータクイズ固有レイアウト */
.pq-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.pq-chart-card {
  background-color: #232628;
  border: 2px solid #444;
  border-top: 4px solid #e7412b;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pq-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.pq-card-title {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

.pq-card-sub {
  font-size: 11px;
  color: #aaa;
}

.pq-radar-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
}

.pq-radar-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
  overflow: visible;
}

.pq-radar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #ccc;
  margin-top: 6px;
  min-height: 24px;
}

.pq-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pq-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.pq-legend-dot--answer {
  background-color: rgba(231, 65, 43, 0.55);
  border: 2px solid #ff6b4a;
}

.pq-legend-dot--compare {
  background-color: rgba(0, 210, 255, 0.25);
  border: 2px dashed #38d9ff;
}

.pq-compare-clear {
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: #ddd;
  background-color: #35393d;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
}

.pq-compare-clear:hover {
  border-color: #38d9ff;
  color: #fff;
}

/* 右カラム：特徴パラメータ TOP3（上位・下位） */
.pq-highlights-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pq-hl-block {
  background-color: #232628;
  border: 2px solid #444;
  border-radius: 10px;
  padding: 14px 16px;
  flex: 1;
}

.pq-hl-block--top {
  border-top: 4px solid #2ecc71;
}

.pq-hl-block--low {
  border-top: 4px solid #e74c3c;
}

.pq-hl-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pq-hl-block--top .pq-hl-title {
  color: #2ecc71;
}

.pq-hl-block--low .pq-hl-title {
  color: #ff6b6b;
}

.pq-hl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pq-stat-row {
  background-color: #181a1b;
  border: 1px solid #383c40;
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pq-stat-row.locked {
  opacity: 0.55;
  border-style: dashed;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  color: #888;
  font-size: 13px;
}

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

.pq-stat-name {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
}

.pq-stat-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pq-stat-rank {
  font-size: 14px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: #2c3034;
  color: #fff;
}

.pq-stat-rank.rank-gold {
  background: linear-gradient(90deg, #f39c12, #f1c40f);
  color: #181a1b;
}

.pq-stat-rank.rank-top {
  background-color: rgba(46, 204, 113, 0.22);
  color: #4cd964;
  border: 1px solid rgba(46, 204, 113, 0.45);
}

.pq-stat-rank.rank-low {
  background-color: rgba(231, 76, 60, 0.22);
  color: #ff7675;
  border: 1px solid rgba(231, 76, 60, 0.45);
}

.pq-stat-val {
  font-size: 12px;
  color: #bbb;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pq-stat-bar-bg {
  width: 100%;
  height: 6px;
  background-color: #2c3034;
  border-radius: 999px;
  overflow: hidden;
}

.pq-stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.pq-hl-block--top .pq-stat-bar-fill {
  background: linear-gradient(90deg, #10ac84, #4cd964);
}

.pq-hl-block--low .pq-stat-bar-fill {
  background: linear-gradient(90deg, #c0392b, #ff6b6b);
}

/* 追加ヒントエリア */
.pq-extra-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.pq-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.pq-detail-chip {
  background-color: #181a1b;
  border: 1px solid #383c40;
  border-radius: 6px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pq-detail-chip-name {
  font-size: 11px;
  color: #aaa;
}

.pq-detail-chip-val {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.pq-detail-chip-rank {
  font-size: 12px;
  color: #f1c40f;
}

.pq-detail-chip-rank.is-top {
  color: #4cd964;
}

.pq-detail-chip-rank.is-low {
  color: #ff7675;
}

/* 予想履歴（比較バッジ＆グラフ重ね合わせボタン） */
.pq-guess-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: #26292c;
  border-left: 4px solid #e74c3c;
  border-radius: 6px;
  padding: 10px 14px;
}

.pq-guess-row.correct {
  border-left-color: #2ecc71;
  background-color: #1b2e23;
}

.pq-guess-row.comparing {
  outline: 1px solid #38d9ff;
}

.pq-guess-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pq-cmp-pill {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: #1a1d1f;
  border: 1px solid #444;
  color: #ddd;
  white-space: nowrap;
}

.pq-cmp-pill.up {
  border-color: rgba(46, 204, 113, 0.5);
  color: #4cd964;
}

.pq-cmp-pill.down {
  border-color: rgba(231, 76, 60, 0.5);
  color: #ff7675;
}

.pq-cmp-pill.same {
  border-color: rgba(241, 196, 15, 0.6);
  color: #f1c40f;
}

.pq-cmp-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #38d9ff;
  background-color: rgba(56, 217, 255, 0.1);
  border: 1px solid rgba(56, 217, 255, 0.45);
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.pq-cmp-btn:hover,
.pq-cmp-btn.active {
  background-color: rgba(56, 217, 255, 0.28);
  color: #fff;
}

/* 直前の回答フィードバックバナー（不正解・ヒント解放の明示） */
.pq-feedback-banner {
  display: none;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.5;
  align-items: center;
  gap: 10px;
}

.pq-feedback-banner.is-wrong {
  display: flex;
  background-color: rgba(231, 76, 60, 0.18);
  border: 2px solid #e74c3c;
  color: #ffd6d6;
  animation: pq-shake 0.36s ease;
}

.pq-feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e74c3c;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}

.pq-guess-status {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.pq-guess-status.wrong {
  background-color: rgba(231, 76, 60, 0.25);
  border: 1px solid #e74c3c;
  color: #ff7675;
}

.pq-guess-status.correct {
  background-color: rgba(46, 204, 113, 0.25);
  border: 1px solid #2ecc71;
  color: #4cd964;
}

.pq-guess-row.is-latest {
  animation: pq-pop-in 0.35s ease;
}

.share-toast.is-wrong {
  background-color: #c0392b;
  border: 1px solid #ff7675;
}

@keyframes pq-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes pq-pop-in {
  0% { opacity: 0.4; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* フッター関連リンク */
.pq-footer-note {
  text-align: center;
  margin: 18px 0 6px;
  font-size: 13px;
  color: #aaa;
}

.pq-footer-note a {
  color: #5dade2;
  text-decoration: underline;
}

.pq-footer-sep {
  margin: 0 10px;
  color: #666;
}

@media (max-width: 820px) {
  .pq-main-grid {
    grid-template-columns: 1fr;
  }

  .pq-radar-svg {
    max-width: 360px;
  }

  .pq-guess-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
