/* interval-alarm-timer 用 プレビューカード＆特定レイアウトスタイル */

/* SE選択トグルのツール限定レイアウト（最大5個で折り返し） */
.sound-toggle-group {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
	width: 100%;
}

@media (max-width: 640px) {
	.sound-toggle-group {
		grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	}
}

.timer-display-box {
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	border-radius: 16px;
	padding: 24px;
	color: #f8fafc;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
	margin-top: 12px;
	font-family: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

/* 各データブロック */
.preview-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	text-align: center;
}

.preview-block.sub {
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-label {
	font-size: 13px;
	color: #94a3b8;
	margin-bottom: 8px;
	letter-spacing: 0.05em;
}

/* 1 & 2. 現在時刻および次の通知までの数値サイズ（同一統一） */
.preview-value.primary-value {
	font-size: 36px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #38bdf8;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
}

/* 3. 通知予定時間リスト（白文字、横並び5件表示） */
.next-times-list {
	list-style: none;
	padding: 0;
	margin: 8px 0 0 0;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	width: 100%;
}

.next-times-list li {
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.05em;
	font-variant-numeric: tabular-nums;
}

/* アラーム間隔 4桁入力フォーム */
.time-input-group {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding-left: 20px;
}

.time-input-group input[type="text"].digit-input {
	flex: none !important;
	width: 64px !important;
	height: 72px;
	font-size: 2.25rem;
	font-weight: bold;
	text-align: center;
	background: transparent;
	color: #fff;
	border: 1px solid #444;
	border-radius: 8px;
	outline: none;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

/* タイマー実行中の数値の色（薄青色） */
.time-input-group input[type="text"].digit-input.running {
	color: #00d2ff;
}

.time-input-group span {
	min-width: auto !important;
}

/* 操作ボタンの幅均一化 */
.flex-center #start-btn,
.flex-center #pause-btn,
.flex-center #stop-btn {
	width: 110px;
	flex: none;
}

.digit-inputs {
	display: flex;
	gap: 6px;
}

.time-input-group input[type="text"].digit-input:focus,
.time-input-group input[type="text"].digit-input.active {
	border-color: #00d2ff !important;
}

.keypad-grid-parent {
	position: relative;
}

.keypad-grid-parent.active-keypad {
	position: relative;
	z-index: 9999;
}

/* テンキー表示時に画面全体を暗くするバックドロップ */
.keypad-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	z-index: 9990;
	opacity: 0;
	display: none;
	transition: opacity 0.2s ease-out;
}

.keypad-backdrop.show {
	display: block;
	opacity: 1;
}

/* 12マス テンキーのグリッド UI（絶対座標表示・18px下にシフト） */
.keypad-grid {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
	display: none;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 5px;
	max-width: 320px;
	width: 100%;
	margin-top: 18px;
	box-sizing: border-box;
	align-items: center;
	align-content: center;
	opacity: 0;
	transition: opacity 0.2s ease-out;
}

.keypad-grid.show {
	display: grid;
	opacity: 1;
}

.key-btn {
	background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
	border: 1px solid #4a5568;
	color: #fff;
	font-size: 1.5rem;
	font-weight: bold;
	aspect-ratio: 1.2 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	cursor: pointer;
	user-select: none;
	margin: 2px;
	transition: all 0.1s ease;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.key-btn:active {
	transform: translateY(2px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	background: #1a202c;
}

.key-btn.action-key {
	font-size: 1.5rem;
	font-weight: 900;
}

.key-btn.clear-key {
	background: linear-gradient(135deg, #742a2a 0%, #5c2323 100%);
	border-color: #9b2c2c;
}

.key-btn.clear-key:active {
	background: #5c2323;
}

.key-btn.submit-key {
	background: linear-gradient(135deg, #22543d 0%, #1c4530 100%);
	border-color: #276749;
}

.key-btn.submit-key:active {
	background: #1c4530;
}