/* 固定カード全体 */
.fixed-challenge-wrapper {
/*
    position: fixed;
    top: 20px;
    right: 20px;
*/
	position: relative; /* これで内部の absolute が右上に固定可能 */
    max-width: 1000px;
    background: #fe456e;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px 25px 15px 25px;
    font-family: 'Arial', sans-serif;
    margin: 0px auto;
    margin-bottom: 20px;
    
    background-image: url(/tsukuyomi/challenge_25x/img/bg.png);
    background-size: 15px 15px;
}
@media (max-width: 768px) {
  .fixed-challenge-wrapper {
    border-radius: 0;
    box-shadow: 0 0px 5px rgba(0,0,0,0.15);
    padding: 10px 25px;
  }
}
/* タイトル */
.fixed-challenge-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: -20px;
}
.highlight {
    color: #ff9800;
    font-weight: bold;
}

.challenge-message {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 12px;
    margin: 12px 0;
    line-height: 1.6;
	font-size: 1.4rem;
}
.challenge-message a{
	color: #2ec86e;
}
.challenge-message p{
	font-size: 1.4rem;
}
.challenge-message strong {
    color: #e74c3c;
    font-weight: bold;
}




/* ボタンリンク */
.link-button {
    background-color: #ff69b4;
    color: #fff !important;
    font-weight: bold;
    border: none;
    padding: 5px 34px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.3s;

    display: block;        /* ブロック要素にする */
    margin: 0 auto;        /* ← 横方向中央寄せ */
    text-align: center;
    width: 70%;    /* ← 必要に応じてボタン幅を内容に合わせる */
}

.link-button:hover {
    background-color: #ff85c1;
}

/* 進捗バー */
.progress-bar-container {
	position: relative;
	height: 30px;
	background: #eee;
	margin: 0 auto;
	margin-top: 50px;
	border-radius: 20px;
	width: 100%;
}

.progress-bar {
	position: relative;
	height: 100%;
	line-height: 30px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    border-radius: 20px;
}
.pin-modal-wrapper {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.3);
	z-index: 1000;
}
.pin-modal-content {
	position: relative;
}
.details-header {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
    color: #2c3e50;
}

.pin-close-btn {
/*
	position: absolute;
	top: 10px;
	right: 10px;
*/
	cursor: pointer;
	font-size: 20px;
}
.pin-modal-wrapper.show {
	display: block;
}
.progress-pin {
  position: absolute;
  top:-28px;
  transform: translateX(-70%);
/*   cursor: pointer; */
}
/* ホバーで説明のラベルが出てくる */
/*
.progress-pin::after {
    content: attr(data-label);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    width: 145px;
    white-space: normal;  
    line-height: 1.4;    
    text-align: left;      
    display: none;
    pointer-events: none;
    transition: opacity 0.2s;
}
*/
/* PCホバー時に表示 */
/*
@media (hover: hover) {
    .progress-pin:hover::after,
    .progress-pin:hover::before {
        opacity: 1;
    }
}
*/
.pin-label {
  padding:4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: bold;
  color: #f8f8f8;
  position: relative;
  white-space: nowrap;
}
/* 文字だけ左に10pxずらす */
.progress-pin{
	margin-left: 8px;
}
/* 文字だけ左に10pxずらす */
.progress-pin[data-percent="100"] .pin-text {
    position: relative;
	left: 0px;  
}
/* バー上の%表示部分のしたの三角 */
.pin-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--pin-color, #000) transparent transparent transparent;
}

/* achieved用のラベル */
.pin-label::before {
  content: "CLEAR!";
  position: absolute;
  top: -2em;   /* 上に配置 */
  left: 50%;
  transform: translateX(-50%) rotate(-5deg);
  
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(45deg, #ffeb98, #ff009a);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
  
  display: none; /* 通常は非表示 */
  animation: popIn 0.4s ease-out forwards;
}
/* 出現アニメーション */
@keyframes popIn {
  0% { transform: translateX(-50%) scale(0.5) rotate(-5deg); opacity: 0; }
  80% { transform: translateX(-50%) scale(1.1) rotate(-5deg); opacity: 1; }
  100% { transform: translateX(-50%) scale(1) rotate(-5deg); }
}
/* achieved時だけ表示 */
.achieved .pin-label::before {
  display: block;
}


/* ユーザー寄与度 */
.user-contribution {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
    text-align: right;
}

/* 最終更新日 */
.last-update {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
    text-align: right;
}

/* 丸いプラスボタン */
.toggle-details {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #3498db;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
}
@media (max-width: 768px) {
  .toggle-details {
    width: 30px;
    height: 30px;
    margin-left: 20px;
  }
}
.toggle-details:hover {
    background-color: #2980b9;
}
.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #27ae60;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
}

.icon-link:hover {
    background-color: #219150;
}
.challenge-details{
	margin-top: 15px;
}
.challenge-note{
	font-size: 12px;
	color: #ff3254;
}
@media (max-width: 768px) {
.campaign-link.icon{
	display: none;
	}
}


.campaign-link {
  text-align: center; /* 中央寄せ */
  margin: 20px 0;
}

.campaign-link .link-button {
  display: inline-block;       /* インライン要素をボタン化 */
  background-color: #363636;   /* ボタン背景 */
  color: #fff;                 /* 文字色 */
  padding: 10px 20px;          /* 余白 */
  border-radius: 100px;          /* 角丸 */
  text-decoration: none;       /* 下線消す */
  font-size: 1.5rem;           /* 文字サイズ */
  font-weight: bold;
  width: 100%;
  margin-bottom: -15px;
  box-sizing: border-box; /* ← パディングやボーダーでサイズがズレない */
  transition: background-color 0.3s, background-image 0.3s; /* ← 背景だけ変化 */
}

.campaign-link .link-button:hover {
  background-color: #d93a5a;   /* ホバー時に少し濃く */
}
@media (max-width: 768px) {
	.campaign-link .link-button{
		margin-top: -10px;
	}
}


.logo{
	text-align: center;
}
.logo img{
	width: 60%;
	margin: auto 0;
}
@media (max-width: 768px) {
  .logo img {
    width: 100%;   /* 横幅いっぱい */
  }
}

/* スマホ対応 */
@media screen and (max-width: 480px) {
    .fixed-challenge-wrapper {
		margin-top: -10px;
		margin-bottom: -4px;
        width: 100%;
    }
    .progress-bar-bg {
        height: 18px;
    }
    .progress-bar-fill {
        font-size: 11px;
        line-height: 18px;
    }
    .link-button {
	    display: block;
        font-size: 1.5rem;
        padding: 4px 10px;
        width: 100%;
        margin-top: 10px;
        margin-bottom: -5px;
        font-weight: bold;
        text-align: center;
    }
    .progress-bar {
		font-size: 14px;
	}
}