.timer-container {
	display: flex;
	justify-content: center;
	align-items: center;
	background: #000;
	border: 2px solid #222;
	border-radius: 20px;
	padding: 40px;
	margin: 30px auto;
	max-width: 500px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timer-display {
	font-family: 'Courier New', Courier, monospace;
	font-size: 5rem;
	font-weight: bold;
	color: #00ffcc;
	text-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
	font-variant-numeric: tabular-nums;
	letter-spacing: 2px;
}

.preset-btn {
	font-size: 3rem;
	padding: 16px 40px;
	border: none;
	border-radius: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.1s ease;
}

/* スタートボタン（初期・通常時：緑系） */
#start-btn {
	background: #00c878;
	color: #fff;
	box-shadow: 0 8px 0 #00965a, 0 12px 20px rgba(0, 200, 120, 0.3);
}

#start-btn:hover {
	background: #00db84;
	transform: translateY(2px);
	box-shadow: 0 6px 0 #00965a, 0 8px 15px rgba(0, 200, 120, 0.3);
}

#start-btn:active {
	transform: translateY(8px);
	box-shadow: 0 0 0 #00965a, 0 3px 5px rgba(0, 200, 120, 0.2);
}

/* ストップボタン（赤系） */
#start-btn.stop-active {
	background: #ff5555;
	color: #fff;
	box-shadow: 0 8px 0 #cc3333, 0 12px 20px rgba(255, 85, 85, 0.3);
}

#start-btn.stop-active:hover {
	background: #ff7777;
	transform: translateY(2px);
	box-shadow: 0 6px 0 #cc3333, 0 8px 15px rgba(255, 85, 85, 0.3);
}

#start-btn.stop-active:active {
	transform: translateY(8px);
	box-shadow: 0 0 0 #cc3333, 0 3px 5px rgba(255, 85, 85, 0.2);
}

/* リセットボタン（グレー系） */
#start-btn.reset-active {
	background: #4a5568;
	color: #fff;
	box-shadow: 0 8px 0 #2d3748, 0 12px 20px rgba(74, 85, 104, 0.3);
}

#start-btn.reset-active:hover {
	background: #718096;
	transform: translateY(2px);
	box-shadow: 0 6px 0 #2d3748, 0 8px 15px rgba(74, 85, 104, 0.3);
}

#start-btn.reset-active:active {
	transform: translateY(8px);
	box-shadow: 0 0 0 #2d3748, 0 3px 5px rgba(74, 85, 104, 0.2);
}

/* 紙吹雪コンテナ: ページ全体に重なる固定オーバーレイ */
.confetti-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9999;
	overflow: hidden;
}

/* 紙吹雪の1片 */
.confetti-piece {
	position: absolute;
	top: -20px;
	pointer-events: none;
	animation: confetti-fall linear forwards;
	border-radius: 2px;
}

@keyframes confetti-fall {
	0% {
		transform: translateY(0) rotate3d(1, 1, 1, 0deg);
		opacity: 1;
	}

	90% {
		opacity: 1;
	}

	100% {
		transform: translateY(110vh) rotate3d(1, 1, 1, 720deg);
		opacity: 0;
	}
}

/* モーダルオーバーレイ */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(5px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
}

/* モーダルカード */
.modal-card {
	background: #1a202c;
	border: 1px solid #4a5568;
	border-radius: 16px;
	padding: 24px;
	width: 100%;
	min-width: 450px;
	max-width: 500px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
	color: #fff;
	text-align: center;
	box-sizing: border-box;
}

@media (max-width: 480px) {
	.modal-card {
		min-width: auto;
		width: 90%;
	}
}

.modal-title {
	font-size: 1.5rem;
	margin-bottom: 8px;
	color: #00ffcc;
	font-weight: bold;
}

.modal-desc {
	font-size: 0.9rem;
	color: #cbd5e0;
	margin-bottom: 16px;
}

.modal-score-box {
	background: #2d3748;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 20px;
}

.modal-stopped-time {
	font-family: 'Courier New', Courier, monospace;
	font-size: 2.2rem;
	font-weight: bold;
	color: #00ffcc;
	text-align: center;
	padding: 4px 0;
	letter-spacing: 1px;
}

.score-item {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
	font-size: 1rem;
}

.score-item:last-child {
	margin-bottom: 0;
}

.score-label {
	color: #a0aec0;
}

#modal-diff-val {
	font-weight: bold;
	color: #00fa9a;
}

.modal-input-wrapper {
	text-align: left;
	margin-bottom: 24px;
}

.modal-input-wrapper label {
	display: block;
	font-size: 0.85rem;
	color: #a0aec0;
	margin-bottom: 8px;
}

.modal-input-wrapper input {
	width: 100%;
	padding: 10px;
	background: #2d3748;
	border: 1px solid #4a5568;
	border-radius: 6px;
	color: #fff;
	font-size: 1rem;
	box-sizing: border-box;
}

.modal-input-wrapper input:focus {
	outline: none;
	border-color: #00ffcc;
	box-shadow: 0 0 5px rgba(0, 255, 204, 0.4);
}

.modal-btn-group {
	display: flex;
	gap: 12px;
}

.modal-btn {
	flex: 1;
	padding: 12px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	border: none;
	transition: background 0.2s;
}

.submit-btn {
	background: #00fa9a;
	color: #1a202c;
}

.submit-btn:hover {
	background: #33ffad;
}

.cancel-btn {
	background: #4a5568;
	color: #fff;
}

.cancel-btn:hover {
	background: #718096;
}