/* =========================
   Kojipro Goals - Base
========================= */

.kg-wrap {
  max-width: 900px;
  margin: 40px auto;
}

.kg-search {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 28px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 15px;
}

/* =========================
   Person Card
========================= */

.kg-person {
  position: relative;
  margin-bottom: 36px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.kg-person::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
}

.kg-person-inner {
  position: relative;
  padding: 22px;
}

.kg-person-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 18px;
  color: #222;
}

/* =========================
   Goal Card
========================= */

.kg-goal {
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
}

.kg-goal-overlay {
  padding: 16px;
  color: #fff;
}

/* =========================
   Category
========================= */

.kg-category {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 15px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.25);
}

/* =========================
   Text
========================= */

.kg-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.kg-detail {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.5;
  white-space: pre-line;
}

/* =========================
   Progress Bar
========================= */

.kg-progress {
  margin-top: 10px;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  overflow: hidden;
}

.kg-progress-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.6s ease;
}

/* =========================
   Done
========================= */

.kg-goal.is-done .kg-progress-bar {
  background: #ffffff;
}

/* =========================
   Category Colors
========================= */

/* 配信（青） */
.kg-goal.category-stream .kg-goal-overlay {
  background: linear-gradient(
    135deg,
    rgba(59,130,246,0.9),
    rgba(30,64,175,0.9)
  );
}

/* イベント（紫） */
.kg-goal.category-event .kg-goal-overlay {
  background: linear-gradient(
    135deg,
    rgba(168,85,247,0.9),
    rgba(107,33,168,0.9)
  );
}

/* こじプロ（緑） */
.kg-goal.category-kojipro .kg-goal-overlay {
  background: linear-gradient(
    135deg,
    rgba(34,197,94,0.9),
    rgba(21,128,61,0.9)
  );
}

/* コミュニティ（オレンジ） */
.kg-goal.category-community .kg-goal-overlay {
  background: linear-gradient(
    135deg,
    rgba(251,146,60,0.85),   /* orange-400 */
    rgba(194,65,12,0.85)     /* orange-700 */
  );
}

/* その他 */
.kg-goal.category-other .kg-goal-overlay {
  background: rgba(0,0,0,0.7);
}

/* =========================
   Person Header
========================= */

.kg-person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.kg-person-rate {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  background: rgba(0,0,0,0.05);
  padding: 6px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================
   Trophy
========================= */

.kg-trophy {
  font-size: 18px;
  animation: trophy-pop 0.4s ease;
}

@keyframes trophy-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 全達成時の人物カード */
.kg-person.is-perfect::before {
  background: linear-gradient(
    135deg,
    rgba(255,215,0,0.15),
    rgba(255,255,255,0.85)
  );
}

/* =========================
   Person Tabs
========================= */

.kg-person-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.kg-person-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.2);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.kg-person-tab.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}
