#pmApp {
	--pm-ink: #0f172a;
	--pm-muted: #64748b;
	--pm-line: #e2e8f0;
	--pm-primary: #3b82f6;
	--pm-primary-hover: #2563eb;
	--pm-primary-deep: #1d4ed8;
	--pm-soft: #eff6ff;
	--pm-mid: #dbeafe;
	--pm-sky: #60a5fa;
	--pm-rest: #38bdf8;
	--pm-long: #818cf8;
	--pm-panel: #fff;
	--pm-radius: 0.5rem;
	--pm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
	--pm-ring: 603.2;
	color: var(--pm-ink);
}

#pmApp .pm-shell {
	background: #fff;
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius);
	box-shadow: var(--pm-shadow);
	overflow: hidden;
}

#pmApp .pm-panel {
	background: var(--pm-panel);
}

#pmApp .pm-modes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
	margin: 0 auto 1.75rem;
	max-width: 28rem;
	padding: 0.3rem;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
}

#pmApp .pm-mode {
	flex: 1 1 0;
	min-width: 5rem;
	padding: 0.6rem 1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #64748b;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out;
}

#pmApp .pm-mode:hover {
	color: #334155;
	background: rgba(255, 255, 255, 0.7);
}

#pmApp .pm-mode:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

#pmApp .pm-mode.is-active {
	background: #fff;
	color: var(--pm-primary-deep);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(59, 130, 246, 0.12);
}

#pmApp .pm-stage {
	display: flex;
	justify-content: center;
	margin-bottom: 1.75rem;
}

#pmApp .pm-ring-wrap {
	position: relative;
	width: min(100%, 268px);
	aspect-ratio: 1;
}

#pmApp .pm-ring-glow {
	position: absolute;
	inset: 12%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0.04) 48%, transparent 72%);
	pointer-events: none;
	transition: background 220ms ease-out;
}

#pmApp .pm-stage[data-mode="short"] .pm-ring-glow {
	background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0.04) 48%, transparent 72%);
}

#pmApp .pm-stage[data-mode="long"] .pm-ring-glow {
	background: radial-gradient(circle, rgba(129, 140, 248, 0.2) 0%, rgba(129, 140, 248, 0.05) 48%, transparent 72%);
}

#pmApp .pm-ring {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	filter: drop-shadow(0 8px 18px rgba(37, 99, 235, 0.12));
}

#pmApp .pm-ring-track {
	fill: none;
	stroke: #e2e8f0;
	stroke-width: 12;
}

#pmApp .pm-ring-progress {
	fill: none;
	stroke: url(#pmRingGradient);
	stroke-width: 12;
	stroke-linecap: round;
	stroke-dasharray: var(--pm-ring);
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 220ms ease-out, stroke 200ms ease-out;
}

#pmApp .pm-stage[data-mode="short"] .pm-ring-progress {
	stroke: var(--pm-rest);
}

#pmApp .pm-stage[data-mode="long"] .pm-ring-progress {
	stroke: var(--pm-long);
}

#pmApp .pm-ring-center {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem;
}

#pmApp .pm-mode-label {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pm-primary);
}

#pmApp .pm-stage[data-mode="short"] .pm-mode-label {
	color: #0284c7;
}

#pmApp .pm-stage[data-mode="long"] .pm-mode-label {
	color: #4f46e5;
}

#pmApp .pm-time {
	margin: 0.4rem 0 0;
	font-size: clamp(3rem, 9vw, 3.75rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	color: var(--pm-ink);
}

#pmApp .pm-status {
	margin: 0.6rem 0 0;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #475569;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
}

#pmApp .pm-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1.75rem;
}

#pmApp .pm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 3rem;
	min-width: 7rem;
	padding: 0 1.5rem;
	border-radius: 0.5rem;
	font-weight: 600;
	font-size: 0.9375rem;
	cursor: pointer;
	transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out;
}

#pmApp .pm-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

#pmApp .pm-btn-primary {
	border: 0;
	background: var(--pm-primary);
	color: #fff;
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

#pmApp .pm-btn-primary:hover {
	background: var(--pm-primary-hover);
}

#pmApp .pm-btn-primary.is-running {
	background: var(--pm-primary-hover);
}

#pmApp .pm-btn-primary.is-running:hover {
	background: var(--pm-primary-deep);
}

#pmApp .pm-btn-ghost {
	border: 1px solid #d1d5db;
	background: #fff;
	color: #374151;
}

#pmApp .pm-btn-ghost:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #1e293b;
}

#pmApp .pm-ico {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
}

#pmApp .pm-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

#pmApp .pm-stat {
	text-align: center;
	padding: 0.9rem 0.65rem;
	border: 1px solid var(--pm-line);
	border-radius: 0.5rem;
	background: #fff;
}

#pmApp .pm-stat-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	color: #64748b;
	margin-bottom: 0.3rem;
}

#pmApp .pm-stat-value {
	display: block;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pm-ink);
	font-variant-numeric: tabular-nums;
}

#pmApp .pm-settings {
	border: 1px solid var(--pm-line);
	border-radius: 0.75rem;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#pmApp .pm-settings-summary {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.95rem 1.1rem;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--pm-ink);
	list-style: none;
	user-select: none;
	transition: background-color 160ms ease-out;
}

#pmApp .pm-settings-summary::-webkit-details-marker {
	display: none;
}

#pmApp .pm-settings-summary:hover {
	background: var(--pm-soft);
}

#pmApp .pm-settings-summary:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}

#pmApp .pm-settings-summary .pm-ico {
	color: var(--pm-primary);
}

#pmApp .pm-settings-body {
	padding: 0 1.1rem 1.2rem;
	border-top: 1px solid #e2e8f0;
	background: linear-gradient(180deg, #f8fbff 0%, #fff 40%);
}

#pmApp .pm-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
	padding-top: 1.05rem;
}

#pmApp .pm-label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #334155;
	margin-bottom: 0.35rem;
}

#pmApp .pm-input {
	width: 100%;
	height: 2.85rem;
	padding: 0 0.9rem;
	border: 1px solid #cbd5e1;
	border-radius: 0.6rem;
	background: #fff;
	color: var(--pm-ink);
	font-variant-numeric: tabular-nums;
	outline: none;
	transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}

#pmApp .pm-input:focus {
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 1px #3b82f6;
}

#pmApp .pm-toggles {
	display: grid;
	gap: 0.7rem;
	margin-top: 1.05rem;
}

#pmApp .pm-toggle {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.6rem;
	background: #fff;
	font-size: 0.875rem;
	color: #334155;
	cursor: pointer;
	transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

#pmApp .pm-toggle:hover {
	border-color: #bfdbfe;
	background: var(--pm-soft);
}

#pmApp .pm-toggle input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--pm-primary);
	cursor: pointer;
}

#pmApp .pm-hint {
	margin: 0.95rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--pm-muted);
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.6rem;
	padding: 0.7rem 0.9rem;
}

#pmApp .pm-notes {
	background: #fff;
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}

#pmApp .pm-notes a {
	color: #2563eb;
}

body.pm-fs-lock {
	overflow: hidden;
}

#pmApp.is-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 9999;
	width: 100vw;
	width: 100dvw;
	height: 100vh;
	height: 100dvh;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: #eff6ff;
	overflow: auto;
	box-sizing: border-box;
}

#pmApp.is-fullscreen > *:not(.pm-main) {
	display: none !important;
}

#pmApp.is-fullscreen .pm-main {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 36rem;
	margin: 0;
}

#pmApp.is-fullscreen .pm-shell {
	width: 100%;
	border: 0;
	background: transparent;
	box-shadow: none;
}

#pmApp.is-fullscreen .pm-panel {
	background: transparent;
	padding-top: 0;
	padding-bottom: 0;
}

#pmApp.is-fullscreen .pm-stats,
#pmApp.is-fullscreen .pm-settings {
	display: none !important;
}

#pmApp.is-fullscreen .pm-stage {
	margin-bottom: 1.75rem;
}

#pmApp.is-fullscreen .pm-ring-wrap {
	width: min(72vw, 360px);
	margin-left: auto;
	margin-right: auto;
}

#pmApp.is-fullscreen .pm-time {
	font-size: clamp(2.2rem, 9vw, 3.4rem);
}

#pmApp.is-fullscreen .pm-actions {
	margin-bottom: 0;
}

@media (max-width: 640px) {
	#pmApp .pm-modes {
		border-radius: 1rem;
	}

	#pmApp .pm-stats {
		grid-template-columns: 1fr;
	}

	#pmApp .pm-field-grid {
		grid-template-columns: 1fr;
	}

	#pmApp .pm-btn {
		flex: 1 1 calc(50% - 0.4rem);
	}

	#pmApp .pm-btn-primary {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	#pmApp .pm-mode,
	#pmApp .pm-btn,
	#pmApp .pm-ring-progress,
	#pmApp .pm-ring-glow,
	#pmApp .pm-input,
	#pmApp .pm-settings-summary,
	#pmApp .pm-toggle {
		transition: none;
	}
}
