.tcp-app {
	--tcp-theme-color: #f0a04b;
	font-family: 'Noto Sans TC', sans-serif;
	max-width: 1000px;
	margin: 0 auto;
	box-sizing: border-box;
	color: #333;
}

.tcp-app *,
.tcp-app *::before,
.tcp-app *::after {
	box-sizing: border-box;
}

.tcp-notice {
	text-align: center;
	padding: 60px 20px;
	font-size: 18px;
	color: #666;
}

.tcp-style-list {
	display: flex;
	margin-top: 5px;
	gap: 5px;
	flex-wrap: wrap;
}

.tcp-style-btn {
	padding: 10px 24px;
	border: 1px solid #999;
	background: #fff;
	border-radius: 6px;
	cursor: pointer;
	font-family: inherit;
}

.tcp-style-btn.is-active {
	background: var( --tcp-theme-color );
	color: #fff;
	border-color: var( --tcp-theme-color );
}

.tcp-workspace {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

.tcp-canvas-wrap {
	/* 不設 max-width 上限：畫布預設用卡片原始設計尺寸顯示，
	   只有容器實際空間不夠（RWD）時才會跟著版面一起縮小，交給 JS 依容器寬度計算。
	   用 flex-grow 讓它在空間夠的時候盡量長大，而不是霸佔整排寬度逼表單掉到下一行。*/
	flex: 1 1 400px;
	min-width: 0;
}

#tcp-stage-container {
	width: 100%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tcp-canvas-notes {
	text-align: center;
	font-size: 16px;
	margin-top: 16px;
}

.tcp-form-side {
	flex: 1 1 280px;
	width: 100%;
	max-width: 360px;
	display: flex;
	flex-direction: column;
	gap: 30px;
	overflow: visible;
}

/* 畫布跟表單擠不下同一排（平板直式、手機）時，表單改滿版顯示，不要卡在 360px 中間留白 */
@media ( max-width: 900px ) {
	.tcp-form-side {
		max-width: 480px;
		gap: 16px;
	}
}

.tcp-field-label {
	font-weight: 600;
	margin-top: 10px;
}

.tcp-max-length-hint {
	font-weight: 400;
	color: #888;
}

.tcp-form-side input,
.tcp-form-side textarea {
	font-family: inherit;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
}

.tcp-form-side textarea {
	width: 100%;
	resize: vertical;
	min-height: 70px;
}

.tcp-turnstile {
	margin-top: 12px;
}

.tcp-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
	overflow: visible;
}

.tcp-btn {
	flex: 1 1 auto;
	padding: 12px 16px;
	border: none;
	border-radius: 999px;
	background: var( --tcp-theme-color );
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}

.tcp-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.tcp-btn-reset {
	background: #999;
}

/* 包住「參加抽獎」按鈕，讓裝飾圖可以相對按鈕定位 */
.tcp-submit-wrap {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	overflow: visible;
}

.tcp-submit-wrap .tcp-btn-submit {
	position: relative;
	z-index: 1;
	width: 100%;
}

/*
 * 裝飾圖（狗 + 對話框）坐在按鈕上緣：
 * - 水平置中，整張 PNG 對齊按鈕中央
 * - 底部往下重疊一點，讓爪子踩在按鈕上
 * - pointer-events: none 避免擋住按鈕點擊
 */
.tcp-lottery-deco {
	position: absolute;
	left: 50%;
	bottom: calc( 100% - 8px );
	z-index: 2;
	width: 86%;
	height: auto;
	transform: translateX( -50% );
	pointer-events: none;
}

/* 螢幕太窄時三個按鈕一排會被字擠爆，改成每個一行 */
@media ( max-width: 400px ) {
	.tcp-actions {
		flex-direction: column;
	}

	.tcp-btn,
	.tcp-submit-wrap {
		width: 100%;
	}
}

.tcp-message {
	min-height: 20px;
	font-size: 14px;
}
