/* ===================================================
   omikuji.css — おみくじバナー用スタイル
   依存フォント（index.phpのheadで読み込むこと）:
   https://fonts.googleapis.com/css2?family=Kaisei+Decol:wght@700&family=M+PLUS+Rounded+1c:wght@700;800;900&display=swap
=================================================== */

/* ── バナー本体 ── */
.omikuji-banner {
	/* width・display・vertical-align は campaign-thumbnail のグリッドに委ねる */
	width: 100%;
	aspect-ratio: 400 / 227;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	border-radius: 8px;
	background: linear-gradient(135deg, #ffe0f0 0%, #fff0c0 50%, #d0f0ff 100%);
	box-shadow: 0 4px 0 #d090b0;
}
/* スクリーントーン風ドット */
.omikuji-banner::before {
	content: '';
	position: absolute; inset: 0;
	background-image: radial-gradient(circle, rgba(255,120,180,0.12) 1px, transparent 1px);
	background-size: 10px 10px;
	z-index: 0;
	pointer-events: none;
}
/* 集中線（マンガ風） */
.omikuji-banner::after {
	content: '';
	position: absolute; inset: 0;
	background: repeating-conic-gradient(
		from 0deg at 50% 50%,
		rgba(255,180,220,0.07) 0deg 3deg,
		transparent 3deg 6deg
	);
	z-index: 0;
	pointer-events: none;
}

/* ── 共通ステート ── */
.omikuji-state {
	position: absolute; inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 4;
}
.omikuji-state.hidden { display: none; }

/* ── 待機画面 ── */
.omikuji-label {
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-size: clamp(11px, 3.5vw, 13px);
	font-weight: 800;
	color: #c0408a;
	letter-spacing: 0.2em;
	background: #fff;
	border: 2px solid #f080b8;
	border-radius: 20px;
	padding: 2% 6%;
	margin-bottom: 4%;
	white-space: nowrap;
	box-shadow: 2px 2px 0 #f080b8;
}
.omikuji-kanji {
	font-family: 'Kaisei Decol', serif;
	font-size: clamp(32px, 13vw, 46px);
	font-weight: 700;
	color: #fff;
	line-height: 1;
	-webkit-text-stroke: clamp(2px, 0.5vw, 3px) #c0408a;
	text-shadow:
		3px 3px 0 #c0408a,
		-1px -1px 0 #c0408a,
		1px -1px 0 #c0408a,
		-1px 1px 0 #c0408a;
	margin-bottom: 3%;
	letter-spacing: 0.05em;
}
.omikuji-btn {
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-size: clamp(11px, 3.5vw, 13px);
	font-weight: 900;
	color: #fff;
	background: linear-gradient(180deg, #ff6eb4 0%, #e0408a 100%);
	border: none;
	border-radius: 30px;
	padding: 4% 9%;
	cursor: pointer;
	box-shadow: 0 4px 0 #a0205a, 0 6px 12px rgba(200,60,120,0.3);
	transition: transform 0.1s, box-shadow 0.1s;
	white-space: nowrap;
	letter-spacing: 0.1em;
}
.omikuji-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 #a0205a, 0 8px 16px rgba(200,60,120,0.3); }
.omikuji-btn:active { transform: translateY(2px);  box-shadow: 0 2px 0 #a0205a; }

/* 日付 */
.omikuji-date {
	position: absolute;
	bottom: 4%; right: 4%;
	font-size: clamp(7px, 1.4vw, 9px);
	color: rgba(180,60,120,0.5);
	letter-spacing: 0.1em;
	z-index: 4;
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-weight: 700;
}

/* ── シェイク画面 ── */
.omikuji-cylinder {
	width: 16%;
	aspect-ratio: 1 / 2;
	background: linear-gradient(160deg, #ffb0d8 0%, #ff6eb4 50%, #e040a0 100%);
	border-radius: 6px 6px 3px 3px;
	box-shadow: 3px 3px 0 #a0205a, inset -3px 0 6px rgba(0,0,0,0.15);
	margin-bottom: 5%;
	position: relative;
}
.omikuji-cylinder::after {
	content: '★';
	position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
	font-size: clamp(8px, 2vw, 12px);
	color: rgba(255,255,255,0.8);
}
.omikuji-shake-text {
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-size: clamp(11px, 3.2vw, 13px);
	font-weight: 900;
	color: #c0408a;
	letter-spacing: 0.2em;
}
@keyframes omikuji-shake {
	0%,100% { transform: rotate(0deg); }
	15% { transform: rotate(-9deg) translateX(-3px); }
	30% { transform: rotate(9deg) translateX(3px); }
	45% { transform: rotate(-6deg) translateX(-2px); }
	60% { transform: rotate(6deg) translateX(2px); }
	75% { transform: rotate(-4deg); }
	90% { transform: rotate(4deg); }
}
.omikuji-cylinder.shaking { animation: omikuji-shake 0.5s ease-in-out infinite; }

/* ── 結果画面（上下2段レイアウト） ── */
.omikuji-result-wrap {
	position: absolute; inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 5;
	opacity: 0;
	transition: opacity 0.4s;
}
.omikuji-result-wrap.visible { opacity: 1; }

.omikuji-paper {
	width: 92%;
	height: 90%;
	background: #fff;
	border-radius: 8px;
	border: 3px solid #f080b8;
	box-shadow: 3px 3px 0 #d060a0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.85) rotate(-1deg);
	transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.omikuji-result-wrap.visible .omikuji-paper { transform: scale(1) rotate(0deg); }

/* 上段：全体を1段で収める */
.omikuji-paper-top {
	background: linear-gradient(135deg, #ff6eb4 0%, #e040a0 100%);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 3%;
	padding: 0 4%;
	flex: 1;           /* paper全体を占有 */
	position: relative;
	overflow: hidden;
}
/* 左右カラム（ラベル＋値） */
.omikuji-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex: 1;
	min-width: 0;
}
/* 運勢の円＋一言：縦並びの中央ブロック */
.omikuji-fortune-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
/* 一言テキスト */
.omikuji-sub {
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-size: clamp(7px, 1.6vw, 9px);
	font-weight: 800;
	color: #fff;
	text-shadow: 1px 1px 0 rgba(160,32,90,0.4);
	letter-spacing: 0.05em;
	white-space: nowrap;
	text-align: center;
}

/* 運勢の円 */
.omikuji-fortune-wrap {
	background: #fff;
	border-radius: 50%;
	width: clamp(46px, 16%, 68px);
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 3px #ffb0d8, 3px 3px 0 #a0205a;
	flex-shrink: 0;
}
.omikuji-fortune {
	font-family: 'Kaisei Decol', serif;
	font-size: clamp(16px, 6vw, 26px);
	font-weight: 700;
	color: #e040a0;
	line-height: 1;
	display: block;
	text-align: center;
}
.omikuji-fortune.kyo { color: #4060d0; }
.omikuji-fortune.sho { color: #20a050; }

/* ラベル（ピンクバッジ） */
.omikuji-rkey {
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-size: clamp(8px, 1.8vw, 9px);
	font-weight: 800;
	color: #fff;
	background: rgba(255,255,255,0.25);
	border: 1px solid rgba(255,255,255,0.6);
	border-radius: 4px;
	padding: 1px 5px;
	white-space: nowrap;
}
/* 値テキスト */
.omikuji-rval {
	font-family: 'M PLUS Rounded 1c', sans-serif;
	font-size: clamp(9px, 2.2vw, 11px);
	font-weight: 900;
	color: #fff;
	text-shadow: 1px 1px 0 rgba(160,32,90,0.4);
	letter-spacing: 0.02em;
	text-align: center;
	line-height: 1.3;
	overflow-wrap: anywhere;
}
/* もう一度引く：右下固定アイコンボタン */
.omikuji-retry {
	position: absolute;
	bottom: 6%;
	right: 3%;
	font-size: clamp(12px, 3vw, 16px);
	line-height: 1;
	color: #fff;
	background: rgba(255,255,255,0.2);
	border: 2px solid rgba(255,255,255,0.7);
	border-radius: 50%;
	width: clamp(20px, 5vw, 26px);
	height: clamp(20px, 5vw, 26px);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 1px 1px 0 rgba(160,32,90,0.3);
	transition: transform 0.1s, box-shadow 0.1s;
	padding: 0;
}
.omikuji-retry:hover  { transform: translateY(-1px); background: rgba(255,255,255,0.35); }
.omikuji-retry:active { transform: translateY(1px); }

/* ── campaign-thumbnail 内でのサイズ制御 ── */
/*
   front_page.css の #s03 .campaign-thumbnail a と同じ幅を div に適用。
   スマホ（〜599px）: 48%  /  600px以上: 33%
*/
#s03 .campaign-thumbnail .omikuji-banner {
	width: 48%;
}
@media only screen and (min-width: 600px) {
	#s03 .campaign-thumbnail .omikuji-banner {
		width: 33%;
	}
}

/* ── キラキラ演出 ── */
.omikuji-petals { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.omikuji-petal  { position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0; }
@keyframes omikuji-fall {
	0%   { transform: translateY(-10px) rotate(0deg) scale(1);   opacity: 1; }
	100% { transform: translateY(250px) rotate(540deg) scale(0); opacity: 0; }
}
@keyframes omikuji-pop {
	0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
	60%  { transform: scale(1.2) rotate(5deg);  opacity: 1; }
	100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}
.omikuji-result-wrap.visible .omikuji-fortune-wrap {
	animation: omikuji-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
